<?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>27848</bug_id>
          
          <creation_ts>2015-01-18 10:29:11 +0000</creation_ts>
          <short_desc>UseCaseJSON-002, UseCaseJSON-007</short_desc>
          <delta_ts>2015-01-19 16:14:30 +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>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="Christian Gruen">christian.gruen</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>117295</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2015-01-18 10:29:11 +0000</bug_when>
    <thetext>The query results should contain all possible permutations, because maps do not necessarily return key/value pairs in the order in which they had been inserted.

See UseCaseJSON-007 as example:

&lt;result&gt;
  &lt;assert-deep-eq&gt;map { &quot;visible&quot; : [ &quot;AJISAI (EGS)&quot;, &quot;AKARI (ASTRO-F)&quot;  ],  &quot;invisible&quot; : [ &quot;AAU CUBESAT&quot; ] }&lt;/assert-deep-eq&gt;
&lt;/result&gt;

&lt;result&gt;
  &lt;any-of&gt;
    &lt;assert-deep-eq&gt;map { &quot;visible&quot; : [ &quot;AJISAI (EGS)&quot;, &quot;AKARI (ASTRO-F)&quot; ], &quot;invisible&quot; : [ &quot;AAU CUBESAT&quot; ] }&lt;/assert-deep-eq&gt;
    &lt;assert-deep-eq&gt;map { &quot;visible&quot; : [ &quot;AKARI (ASTRO-F)&quot; , &quot;AJISAI (EGS)&quot;], &quot;invisible&quot; : [ &quot;AAU CUBESAT&quot; ] }&lt;/assert-deep-eq&gt;
  &lt;/any-of&gt;
&lt;/result&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117299</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-01-18 18:58:45 +0000</bug_when>
    <thetext>Surely this is unnecessary because deep-equal() on maps considers two maps as deep-equal regardless of the order of entries?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117300</commentid>
    <comment_count>2</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2015-01-18 20:29:31 +0000</bug_when>
    <thetext>The order of map entries does not matter indeed. But the results have nodes (UseCaseJSON-002) and arrays (UseCaseJSON-007) that have been generated from map contents; that&apos;s why I believe that all possible permutations need to be checked as possible outcomes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117321</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-01-19 16:08:51 +0000</bug_when>
    <thetext>Sorry, yes, I see your point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117322</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-01-19 16:14:30 +0000</bug_when>
    <thetext>Fixed as suggested.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>