Re: F2F demo: html / xhtml namespace

Le mercredi 18 juillet 2007 à 10:32 -0400, Sean Owen a écrit :
> Yeah any mobile doc might not set the namespace correctly, which
> throws off validation.
> 
> I suggest we, somehow, possibly in Java code, verify that the
> namespace of every node in the parsed DOM is in the XHTML namespace,
> and fail validation if any node isn't.

Note that the DTD for XHTML * sets the namespace on the <html> element
as FIXED, which in DTD parlance means it isn't actually required to set
it to be valid.

That said, and due to the fact that most if not all the browsers out
there don't use a validating mode when parsing XML formats, if you don't
put the xmlns on the html element, you're likely to generate errors on
at least some browsers.

In terms of the checker, I think this means we should default a root
element whose name is "html" and has no defined namespace to be in the
XHTML namespace (so that we can parse is as if it was XHTML), while
throwing an error to the user - I thought there was a specific error
triggered in mobileOK for this, but I don't see it in there in a quick
read.

Dom

Received on Wednesday, 18 July 2007 14:38:15 UTC