<?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>28439</bug_id>
          
          <creation_ts>2015-04-08 13:38:55 +0000</creation_ts>
          <short_desc>[XT30TS] error-1620a</short_desc>
          <delta_ts>2015-04-15 18:04:45 +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>XSLT 3.0 Test Suite</component>
          <version>Working drafts</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="Tim Mills">tim</reporter>
          <assigned_to name="Abel Braaksma">abel.online</assigned_to>
          <cc>abel.braaksma</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>119359</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2015-04-08 13:38:55 +0000</bug_when>
    <thetext>The possible result for this test

            &lt;assert-serialization&gt;&lt;![CDATA[&lt;out&gt;&amp;lt;a/&amp;gt;&lt;/out&gt;]]&gt;&lt;/assert-serialization&gt;

is incorrect.  It should include an XML declaration.

There are a number of other tests which might be similarly affected in _output-test-set.xml and _error-test-set.xml in which &lt;assert-serialization&gt; is used with no method and the transformation produces XML (not XHTML or HTML).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119364</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-08 15:16:50 +0000</bug_when>
    <thetext>Fixed by changing the assert-serialization to assert-xml (which gets rid of the declaration by itself).

It also appeared on error-1620b. Changes pushed.

&gt; There are a number of other tests which might be similarly affected in 
&gt; _output-test-set.xml and _error-test-set.xml in which &lt;assert-serialization&gt; 
&gt; is used with no method and the transformation produces XML (not XHTML or HTML).

Leaving bug &apos;assigned&apos;, I have to look into those.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119373</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2015-04-08 15:59:09 +0000</bug_when>
    <thetext>Confirmed fixed for error-1620b  Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119542</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-15 18:04:45 +0000</bug_when>
    <thetext>After some trial and error, I came up with the following query:

/cat:test-set/cat:test-case
  [cat:result[assert-serialization
    [not(@method) or @method=&apos;xml&apos;]
    [
      (not(@file) and not(contains(., &apos;?xml&apos;)))
      or not(contains(unparsed-text(@file), &apos;&lt;?xml&apos;))
    ]
  ]]
[cat:test/cat:stylesheet
  [doc(@file)/(xsl:stylesheet|xsl:transform)
  [
    empty(xsl:output | .//xsl:result-document) or
    (xsl:output | .//xsl:result-document)[@method=&apos;xml&apos; or empty(@method)]
      [normalize-space(@omit-xml-declaration)=(&apos;no&apos;, &apos;false&apos;, &apos;0&apos;)]
  ]]
]

While I am not 100% sure the query is correct for all cases, it showed me three tests that were a candidate for incorrect settings:

include-0101
output-0312
output-0313

For all three cases these were false negatives. The test was about testing import precedence and the effective setting of omit-xml-declaration was true.

I&apos;ll resolve this bug as fixed, please reopen if you think the query above is wrong and/or if you find other tests that have the wrong serialized output as a result of the xml declaration.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>