Re: xhtml validation

Hello Christoph,

On Tuesday 20 August 2002 23:03, Christoph Schneegans wrote:
> Christian Wolfgang Hujer wrote:
> > I myself also find the statement "The root element of the document
> > must contain an xmlns declaration for the XHTML namespace [XMLNS]"
> > [http://www.w3.org/TR/xhtml1/#strict] a bit misleading.
>
> Really? How would you word this criterion? In fact,

I'd say in
<!DOCTYPE html [
<!ATTLIST html
    xmlns CDATA "http://www.w3.org/1999/xhtml" #FIXED
>
]>
<html>
...
</html>
the root element of the document in fact contains an xmlns declaration for the XHTML namespace.
It doesn't contain the xmlns attribute physically, but it really does logically, and validating XML parsers report html to be in the html namespace even if the attribute physically is not attached to the html element's start tag but logically contained via the DTD.

> <http://www.w3.org/TR/2000/REC-xhtml1-20000126/#docconf> was confusing:
> | The root element of the document must designate the XHTML namespace using
> | the xmlns attribute [XMLNAMES].

> But I think the Second Edition made things clear: strictly conforming
> documents must contain something like
> '<html xmlns="http://www.w3.org/1999/xhtml">'.
Clearer maybe, but only to those that followed the change and the discussion (like us).

The root element must designate the XHTML namespace or the root element must contain an xmlns declaration really sounds the same to me.
Only the examples make things clear.
The intention is that the namespace shall be known even if the document is not validated against its DTD or if the document has no DTD.
Therefore, of course, logically declaring the namespace via the DTD is not enough.

I'd say:
"The start tag of the document element must itself contain the xmlns attribute that declares the XHTML namespace. The declaration of the namespace in the DTD is not enough since user agents are not required to be validating or use the DTD at all."
"The start tag" implies the physical structure, not the logical structure. The second sentence as an annotation makes things clear even to the last one.

Bye

-- 
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
ITCQIS GmbH
Telefon: +49 (089) 27 37 04 37
Telefax: +49 (089) 27 37 04 39
E-Mail: mailto:Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/

Received on Wednesday, 21 August 2002 03:41:17 UTC