Re: What is an XHTML document?

At 03:20 PM 7/24/00 -0500, Dan Connolly wrote:
>In any case, if I were an implementor,
>I would key off the presence of an xmlns attribute
>in the first start tag to detect XHTML.
>
>i.e. if the string "xmlns" occurs beteween the
>first "<html" and the first ">" that follows it
>then treat it as XHTML.

I think some kind of namespace dispatching is probably ideal here, though I
don't know how much fun it would be to add code like:

If the html element has an xmlns attribute, redirect this document to expat
and use the namespace mechanism to identify XHTML content within the browser.

I know Mozilla supports a namespace mechanism for including HTML within XML
documents, though last I checked that namespace was keyed to HTML 4:

http://www.xml.com/pub/2000/03/29/tutorial/index.html

>Hmm... it might be nice to support other prefixes
>for the XHTML namespace, so you might use
>"<" followed by an XML name to find the first start tag.

I'd like to see this, though I don't think such documents are 'Strictly
Conformant' in XHTML 1.0.

Simon St.Laurent
XML Elements of Style / XML: A Primer, 2nd Ed.
http://www.simonstl.com - XML essays and books

Received on Monday, 24 July 2000 16:48:49 UTC