It takes more than a DTD to make a site validate.
Code validation takes a lot into account but is not 100% effective. In fact there is a disclaimer on the W3C site to that effect, particluarly with XHTML.
I've just checked out a couple of the problems the validator highlighted for this site and I have to say it raised an eyebrow.
Some of the faults returned are, well, questionnable to say the least.
If your site is W3C valid then all well and good and although I'd always suggest that people aim for full validation you can end up by sacrificing a lot in the process.
The DOCTYPE declaration, on its own, does little to help validation. Combined with relevant code in the body of the document though, it is a powerful set of tools for validation.
You have to have the right DTD header to validate a page but it ownly works if your body code is correct. Try the !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> DTD with XHTML body code and all hell will break loose.
It's a complicated topic with no short and easy answer but a DTD is only one component of many that are required to validate a page and, as I've mentioned many times in the past, valid code does not always equate to cross-browser compatible code which in itself is bit odd.
You have to have all of the pieces of the puzzle to validate a page and the DTD is just one of them.