September 22, 2002
The X Is For Extensible, Not XML
Further proof that people who read this site are often far smarter that I am: a few wrote in pointing out that the DTD for XHTML Strict allows for only one namespace, fixed at http://www.w3.org/1999/xhtml. So technically the W3C validator has every right to choke on additional namespaces. Removing the DOCTYPE allows the page to validate, but then you have a different problem: your document is now pure XML, so the validator doesn’t catch your XHTML-specific errors if your markup is well-formed.
I had always assumed that XHTML was more XML than HTML, but it appears to be the other way around. It seems perfectly fine to use XHTML 1.0 as a stricter replacement for HTML 4.01. To take advantange of the bleeding-edge XML qualities of XHTML, it looks like the best option for now is to go all-out XML, import whatever XHTML elements you need with namespaces and hope the browser comprehends. Or, use some backend transformation (XSLT, perhaps) to provide HTML to the browser from your XML. In the meantime, I will continue to grumble at the complexity of it all.








