<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29270</bug_id>
          
          <creation_ts>2015-11-09 14:51:05 +0000</creation_ts>
          <short_desc>[SER31] Adaptive Serialization: omit-xml-declaration</short_desc>
          <delta_ts>2015-11-27 13:45:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Serialization 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>abel.braaksma</cc>
    
    <cc>andrew_coleman</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>124131</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2015-11-09 14:51:05 +0000</bug_when>
    <thetext>In &quot;10.1 The Influence of Serialization Parameters upon the Adaptive Output Method&quot;, it is written that &quot;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.&quot;

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

As the XML Output Method is said to be &quot;used&quot; 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124232</commentid>
    <comment_count>1</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2015-11-17 02:58:36 +0000</bug_when>
    <thetext>At tomorrow&apos;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=&quot;yes&quot;.  (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.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124302</commentid>
    <comment_count>2</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2015-11-27 13:45:14 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>