Re: HTML5 and XML syntax

Lachlan Hunt skrev:
>> I got that impression when reading this paragraph in the WD (section 
>> 1.3):
>> -----
>> XHTML documents (XML documents using elements from the HTML namespace) 
>> that use the new features described in this specification and that are 
>> served over the wire (e.g. by HTTP) must be sent using an XML MIME 
>> type such as application/xml or application/xhtml+xml and must not be 
>> served as text/html. [RFC3023]
>> -----
> 
> The XHTML-compatible syntax that is allowed in text/html is only a 
> subset of XML syntax, such as the xmlns attribute and and trailing slash 
> for void elements.  Using non-HTML-compatible XML syntax in text/html is 
> forbidden.

That's reasonable, but this paragraph in the WD needs to be clarified.

> Because it means that if a well-formedness error accidentally slips into 
> the markup, then end users aren't presented with a Yellow Screen of 
> Death, describing an error that they probably won't understand and can 
> do nothing about.

If the author look at his own page before final publication, he would 
also get a YSoD and be forced to correct the error. That would be a good 
thing.

> Just process XHTML documents with XML tools and serialise as HTML before 
> publishing, 

Perhaps you want to use XML tools at the client side as well.

Another advantage with XML syntax is the possibility to use "XML 
islands", i.e. to embed stuff like MathML and SVG into HTML.

> or just use the HTML-compatible subset of the XML syntax.

That would work, but why doesn't the HTML5 WD recommend that?

Received on Monday, 28 January 2008 12:31:47 UTC