[Bug 30086] New: [SER31] Indent=yes does not allow adding document-level whitespace

https://www.w3.org/Bugs/Public/show_bug.cgi?id=30086

            Bug ID: 30086
           Summary: [SER31] Indent=yes does not allow adding
                    document-level whitespace
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Serialization 3.1
          Assignee: cmsmcq@blackmesatech.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The serialization spec (3.0 and 3.1), XML method with indent="yes", does not
allow addition of whitespace after the XML declaration or at the end of the
document, or before or after document-level comments and processing
instructions. The 2.0 spec did allow such whitespace to be added.

I think this is probably an oversight rather than an intentional change.

I think users would be upset if I changed my product to conform to this rule.
See for example:

http://stackoverflow.com/questions/43375117/transformer-transform-writes-the-first-tag-on-the-same-line-as-xml/43379194#43379194

I suggest adding to section 5.1.4:

Whitespace characters MAY be added, elided or replaced at any place where it is
permitted by the XML grammar provided that it is not in the content of an
element (for example, after the XML declaration, or between document-level
comments).

(This is actually more liberal than the 2.0 spec which does not allow
whitespace to be inserted between adjacent top-level comments.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 12 April 2017 20:56:20 UTC