[Bug 13410] New: XML serialisation incompletely defined.

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

           Summary: XML serialisation incompletely defined.
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: davidc@nag.co.uk
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


http://www.whatwg.org/specs/web-apps/current-work/#xml-fragment-serialization-algorithm
http://www.whatwg.org/specs/web-apps/current-work/#html-fragment-serialization-algorithm
http://html5.org/specs/dom-parsing.html#serializing

The XML fragment serialisation is not defined in the same detail as
the HTML fragment serialisation algorithm. The latter specifies in some
detail how the HTML syntax corresponding to a node is constructed, and
how strings are quoted. The XML version does neither.

In particular the algorithm described here is not clearly consistent
with that defined in the draft DOM Parsing and Serialization spec.
For example in the html spec it is implied (although not particularly
explicitly) that a CDATA node may need to be serialised as multiple
CDATA sections if certain otherwise illegal character data is contained
in the node, whereas dom-parsing says:

If data doesn't match the CData production, throw an INVALID_STATE_ERR
exception and terminate the entire algorithm. 

Note that the XQuery/XSLT serialisation spec specifies in detail rules
for serialising CDATA and other problematic cases
http://www.w3.org/TR/xslt-xquery-serialization/#XML_CDATA-SECTION-ELEMENTS
It would be good if the xml and html fragment serialisation algorithms
were at least compatible with the xml, xhtml and html serialisations
defined there.

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

Received on Thursday, 28 July 2011 15:52:11 UTC