<?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>30081</bug_id>
          
          <creation_ts>2017-03-27 18:14:06 +0000</creation_ts>
          <short_desc>functx-fn-number-all</short_desc>
          <delta_ts>2017-03-28 11:55:28 +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>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Josh Spiegel">josh.spiegel</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>mike</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>128506</commentid>
    <comment_count>0</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2017-03-27 18:14:06 +0000</bug_when>
    <thetext>Mike recently modified this test to include a document constructor.  However, this is an XPath test and there is no document constructor in XPath 3.0. 

&lt;test-case name=&quot;functx-fn-number-all&quot; xmlns=&quot;http://www.w3.org/2010/09/qt-fots-catalog&quot;&gt;
      &lt;description/&gt;
      &lt;created by=&quot;Frans Englich&quot; on=&quot;2008-05-16&quot;/&gt;
      &lt;modified by=&quot;Michael Kay&quot; on=&quot;2017-03-17&quot; change=&quot;make construction of document node explicit&quot;/&gt;
      &lt;environment ref=&quot;functx_prices&quot;/&gt;
      &lt;dependency type=&quot;spec&quot; value=&quot;XP30+ XQ10+&quot;/&gt;
      &lt;test&gt;&lt;![CDATA[
         let $priceDoc := (/) 
         return document{(number( $priceDoc//prod[1]/price), number( $priceDoc//prod[1]/@currency), 
                          number(&apos;29.99&apos;), number(&apos;ABC&apos;), number( () ), 
                          $priceDoc// prod/price[number() &gt; 35])}]]&gt;&lt;/test&gt;
      &lt;result&gt;
         &lt;assert-xml&gt;&lt;![CDATA[29.99 NaN 29.99 NaN NaN&lt;price currency=&quot;USD&quot;&gt;69.99&lt;/price&gt;&lt;price currency=&quot;USD&quot;&gt;39.99&lt;/price&gt;]]&gt;&lt;/assert-xml&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;

Why was the document constructor necessary?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128507</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-03-28 11:36:15 +0000</bug_when>
    <thetext>I added document constructors to a number of tests that were producing a sequence of items and then using assert-xml to test against the result of applying &quot;sequence normalization&quot;, that is, the first step of XML serialization. There&apos;s nothing in the specs of the test system to say that the sequence normalization process is always carried out. 

In other cases I changed the assertion to avoid the assert-xml, and that seems a better option here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128508</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2017-03-28 11:55:28 +0000</bug_when>
    <thetext>More specifically, the spec for assert-xml says &quot;The assert-xml assertion succeeds if the result is an XML document that compares deep-equal to the document contained (in XML form) in the assertion.&quot; so it shouldn&apos;t be used in cases where the result is not an XML document.

(We were hitting problems with these tests in Saxon-JS which does not support serialization.)

I&apos;ve changed this test to use different assertions.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>