W3C home > Mailing lists > Public > public-html-comments@w3.org > January 2008

Re: HTML5 and XML syntax

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 28 Jan 2008 18:42:05 +0200
Cc: public-html-comments@w3.org
Message-Id: <FF35F03F-0427-40A8-ACFA-43E006DB476D@iki.fi>
To: temp17@staldal.nu

Disclaimer: This is not an official WG response and does not cite a WG  

On Jan 28, 2008, at 14:31, temp17@staldal.nu wrote:

> Lachlan Hunt skrev:

>> 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.

If you tool accepts text/html from the Web, others may send you stuff  
that doesn't parse as XML anyway. If you wist to consume text/html  
content and process it with an XML toolchain (XSLT transformers, RELAX  
NG validators, DOM manipulations, etc.) it is much better to replace  
the XML parser with an HTML5 parser that exposes an XML parser- 
compatible API.

Such parsers already exist for Java, Python and Ruby at least. It is  
reasonable to expect that as HTML5 matures, implementations for other  
languages become available. The Java implementation even comes with a  
sample program that allows you to run XSLT transforms on HTML5 as if  
you were running them on XHTML5.

Please see

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

That advantage only works with the application/xhtml+xml content type,  
however, so it isn't a reason why one should pretend to use XML in  

>> or just use the HTML-compatible subset of the XML syntax.
> That would work, but why doesn't the HTML5 WD recommend that?

Browsers won't parse text/html as XML, so taking the trouble to jump  
through additional hoops would be a waste of authoring effort.

Adhering to the XML syntax in text/html is like marveling the  
emperor's new clothes, basically. (With the exception of very few  
people who do their own stunts.)

Henri Sivonen
Received on Monday, 28 January 2008 16:42:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:24 UTC