<?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>20102</bug_id>
          
          <creation_ts>2012-11-27 17:19:48 +0000</creation_ts>
          <short_desc>[XT3TS] backwards-039</short_desc>
          <delta_ts>2012-11-28 06:59: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>XSLT 3.0 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</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>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>78926</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-27 17:19:48 +0000</bug_when>
    <thetext>Are the expected results for this test correct?

The keys are:

 &lt;xsl:key name=&quot;k&quot; match=&quot;item&quot; use=&quot;.&quot;/&gt; (from XSLT 1.0 stylesheet)
 &lt;xsl:key name=&quot;k&quot; match=&quot;item&quot; use=&quot;number(.)&quot;/&gt; (from XSLT 2.0 stylesheet)

The input number is:

&lt;content&gt;
 &lt;data&gt;
  &lt;item&gt;1.00&lt;/item&gt;
  &lt;item&gt;2.00&lt;/item&gt; 
  &lt;item&gt;1&lt;/item&gt;  
  &lt;item&gt;2&lt;/item&gt; 
 &lt;/data&gt;
&lt;/content&gt;

Both will use backwards-compatbility behaviour, due to one key being from an XSLT 1.0 stylesheet.

key(&apos;k&apos;, 1.0) will return:

 &lt;item&gt;1.00&lt;/item&gt; because number(&lt;item&gt;1.00&lt;/item&gt;) cast as string = 
                           number(1.0) cast as string

and

  &lt;item&gt;1&lt;/item&gt;  because number(&lt;item&gt;1&lt;/item&gt;) cast as string = 
                           number(1.0) cast as string

Have I missed something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78960</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-11-28 00:08:07 +0000</bug_when>
    <thetext>Saxon is failing this test too, so I suspect you are right that something is wrong with the test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78961</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-11-28 00:45:25 +0000</bug_when>
    <thetext>I agree with your analysis and will change the expected result accordingly.

I&apos;m puzzled by the history. The test appeared in the old test suite as backwards026a and the new test seems identical to the old; Saxon was reporting success against the old test, yet when I run it freestanding it doesn&apos;t report the expected results. The old test suite used the same results file for both tests backwards026 and backwards026a and this could have somehow confused my test driver. Anyway, investigating history is rarely productive in such matters, so I shall just fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78978</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2012-11-28 06:59:28 +0000</bug_when>
    <thetext>We were also passing the test in the old test suite.

Confirmed fixed - thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>