W3C home > Mailing lists > Public > public-html-xml@w3.org > December 2010

Re: HTML5 output method

From: Michael Kay <mike@saxonica.com>
Date: Wed, 22 Dec 2010 09:59:12 +0000
Message-ID: <4D11CBF0.5010605@saxonica.com>
To: James Clark <jjc@jclark.com>
CC: public-html-xml@w3.org
On 22/12/2010 02:07, James Clark wrote:
> On the telcon, we talked about an HTML5 output method for XSLT/XQuery.
> I was looking at HTML output method for XSLT 1.0 to see how well it 
> would work with HTML5.
> Although it's far from ideal, in practice I think it would work 
> reasonably well.
> HTML5 has added a few void elements that XSLT won't know about 
> (command, embed, keygen, source, track, wbr), but I believe HTML5's 
> error handling will ignore the end-tag that XSLT will generate in 
> these cases.
The serialization spec for XSLT 2.0 attempts to anticipate future HTML 

"The HTML output method MUST NOT output an end-tag for an empty element 
if the element type has an empty content model. For HTML 4.0, the 
element types that have an empty content model are area, base, basefont, 
br, col, frame, hr, img, input, isindex, link, meta and param. For 
example, an element written as <br/> or <br></br> in an XSLT stylesheet 
MUST be output as <br>."

It doesn't of course anticipate the DOCTYPE change, but a processor that 
chose to implement <xsl:output method="html" version="5"/> could 
certainly make that change and no-one would have valid grounds to 
complain about its conformance.

A bigger problem is whether the serializer should expect SVG and MathML 
elements to be in a namespace or not.

Michael Kay
Received on Wednesday, 22 December 2010 09:59:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:27 UTC