Re: HTML5 output method

> XML serializers, including those used by XSLT, are free to use xmlns
> attributes exclusively and never generate a prefix.

That's not correct. The XSLT 2.0 / XQuery 1.0 serialization 
specification is prescriptive about what prefix should be used. This is 
for two reasons:

(a) DTDs such as the XHTML DTD that make a document invalid if the wrong 
prefix is used

(b) Some vocabularies use QNames (or XPath expressions) in element or 
attribute content (xsi:type="xs:integer"), and these rely on the correct 
prefix being declared.

Moreover, you can't "use xmlns attributes exclusively and never generate 
a prefix" if there are namespaced attributes such as xlink:href.

None of this, of course, stops us defining an HTML5 serialization 
method. Doing so requires many detailed questions to be resolved, but 
they are tactical questions, and I'm not sure it's productive for this 
TF to address them - we should be more concerned with strategy/policy.

One of the policy questions is whether every XDM instance should have an 
HTML5 serialization (and if so, whether that serialization should always 
be prescriptively defined in the specification), or whether some 
instances should result in serialization errors.
>
>>   * Output escaping needs to be turned off for text content in these
>>   elements in the http://www.w3.org/1999/xhtml namespace: "iframe",
>>   "noembed", "noframes", "noscript", "plaintext", "script", "style",
>>   "xmp"
> In XSLT, output-escaping is suppressed by the generative mechanism,
> not by the output mode.
Not so: for example the XSLT 2.0 HTML output method says "The HTML 
output method MUST NOT perform escaping for the content of the script 
and style elements."

Michael Kay
Saxonica

Received on Monday, 3 January 2011 19:26:44 UTC