Re: HTML5 output method

Henri Sivonen scripsit:

>  * Elements in no namespace can't be represented in text/html. However,
>  for compatibility with legacy XSLT programs that put elements in
>  no namespace for the "html" output mode, it would be convenient
>  to treat elements in no namespace as if they were in the
>  http://www.w3.org/1999/xhtml namespace.

On the contrary, names in the HTML namespace should be treated by HTML
output mode as if they were in no namespace (which is what triggers the
magic treatment of void elements in html output mode).

>  * Elements in the SVG and MathML namespaces won't "work fine" if
>  handled like XML in the sense that namespace prefixes are generated
>  for them. The output method must simply output the local name for
>  elements in the SVG and MathML namespaces and must not generate
>  namespace prefixes.

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

>  * Attributes in the XLink namespace must get serialized with the
>  prefix hard-wired to "xlink". (Attributes in the XML namespace must
>  get serialized with the prefix hard-wired to "xml" as in XML.)

This is also within the competence of XML serializers, though I agree
it should be added to HTML5 output mode.

>  * Need to figure out what to do about elements and attributes in
>  namespaces that aren't representable in text/html. The simplest
>  solution would be to make the serializer ignore them. See also
>  http://www.w3.org/Bugs/Public/show_bug.cgi?id=11099

Since this list will change, it will be necessary to have html5, html6, ...
output modes, or something of the sort.

>  * Streams produced by the new output method must start with <!DOCTYPE
>  html> even if the XSLT program doesn't specify a doctype (and maybe
>  even if it does).

+1

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

>  * When the output method writes a start tag for "pre", "listing" or
>  "textarea" in the http://www.w3.org/1999/xhtml namespace, the output
>  method must immediately write one line feed character into the output
>  stream (to be swallowed by the parser; this way if a text node starting
>  with a line feed follows, *that* line feed round-trips properly).

+1

-- 
John Cowan      cowan@ccil.org        http://www.ccil.org/~cowan
        Is it not written, "That which is written, is written"?

Received on Monday, 3 January 2011 18:15:38 UTC