This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29270 - [SER31] Adaptive Serialization: omit-xml-declaration
Summary: [SER31] Adaptive Serialization: omit-xml-declaration
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Serialization 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-09 14:51 UTC by Christian Gruen
Modified: 2015-11-27 13:45 UTC (History)
2 users (show)

See Also:


Attachments

Description Christian Gruen 2015-11-09 14:51:05 UTC
In "10.1 The Influence of Serialization Parameters upon the Adaptive Output Method", it is written that "Only the item-separator parameter is directly applicable to the Adaptive output method. All serialization parameters, if set, will be passed down to the serialization method that is applied to each item in the supplied sequence."

"5.1.6 XML Output Method: the omit-xml-declaration and standalone Parameters" states that "The XML output method MUST output an XML declaration if the omit-xml-declaration parameter has the value no.".

As the XML Output Method is said to be "used" by the adaptive method for serializing nodes, I am not quite sure if/when an XML declaration is expected to be output: For every (possibly recursively) serialized node? Only once for the first node? Or never at all?
Comment 1 C. M. Sperberg-McQueen 2015-11-17 02:58:36 UTC
At tomorrow's joint call the editors will propose a clarification 
consisting of a note to be added to section 10.1.6:

  Note:

  If these parameters call for an XML declaration to be serialized, then an 
  XML declaration is to be output each time the Adaptive output method delegates 
  the serialization of a node to the XML output method. If several node items 
  appear in the sequence to be serialized or as values in maps or arrays to be 
  serialized, then the output will contain several XML declarations.

The rationale is simple:  a later process may split the output of the adaptive method into multiple files or resources; it may be convenient in such a case to have an XML declaration in each XML fragment.  If multiple declarations are not desired, the user need only set omit-xml-declaration="yes".  (The most obvious reason for not wanting an XML declaration before each XML fragment would be that the result will not be well-formed XML. But the output of the adaptive method is not expected to be well-formed XML in any case.)
Comment 2 Andrew Coleman 2015-11-27 13:45:14 UTC
The WG agreed that a clarifying note is required and instructed the editors to add one.
This was added in section 10.1.6.
http://www.w3.org/XML/Group/qtspecs/specifications/xslt-xquery-serialization-31/html/Overview.html#ADAPTIVE_OMIT-XML-DECLARATION