[Bug 6129] New: Extend HTML output method to support HTML5

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6129

           Summary: Extend HTML output method to support HTML5
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Serialization 1.1
        AssignedTo: zongaro@ca.ibm.com
        ReportedBy: jirka@kosek.cz
         QAContact: public-qt-comments@w3.org


HTML5 working draft introduces few changes to HTML4 syntax that makes
impossible to emit valid HTML5 output using HTML output method. 

1) New !DOCTYPE doesn't use PUBLIC/SYSTEM. 

HTML5 documents should start with 

<!DOCTYPE HTML>

However such output can be produced only by resorting to d-o-e in XSLT. Output
of !DOCTYPE is triggered by presence doctype-public/doctype-system
serialization parameters but their presence will lead to spurious PUBLIC/SYSTEM
part after <!DOCTYPE HTML>

The latest HTML5 WG removes this problem by allowing special !DOCTYPE for
content produced by XSLT in a form

<!DOCTYPE HTML PUBLIC "XSLT-compat"> 

see http://www.w3.org/html/wg/html5/#the-doctype
Putting this into spec wasn't easy and there is still some pushback. Anyway
this way it is possible to use XSLT 1.0 and 2.0 to output subset of HTML5. The
following issues will require more complex changes to HTML output method.

2) New empty elements were introduced, but their list is probably not finished
yet.

List of empty elements should be thus updated or alternatively new
serialization parameter like empty-elements should be created to allow user
control over this serialization property.

3) All HTML5 elements are in http://www.w3.org/1999/xhtml namespace in order to
get consistent DOM behaviour for HTML and XHTML content

The current HTML output method treats specially elements with "non-null
namespace URI". This has to be changed to exclude elements in XHTML namespace
and such elements should be output as if they were in no namespace (no prefix
and no default namespace different then XHTML).

4) SVG and MathML content needs special handling.

It is not settled yet, but HTML5 will provide mechanism for including SVG and
MathML fragments. But as HTML5 is not using XML namespaces some special
treatment for serializing those languages will be necessary (like outputting
only local names for elements from SVG and MathML namespaces).

There are probably few more issues, but not that important now.

I think that cleanest approach for accomodating HTML5 output method is to say
that if version > 5 then additional serialization rules (outlined above) has to
be applied. 

Another problem is that HTML5 is just draft, not recommendation. How to handle
this? Should be HTML5 output method left out of the serialization spec and put
just into some working draft or note to have some baseline for implementors?
After HTML5 gets recommendation status this note could be incorporated directly
into next version of serialization spec.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 30 September 2008 20:08:45 UTC