<?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>3834</bug_id>
          
          <creation_ts>2006-10-13 17:10:40 +0000</creation_ts>
          <short_desc>Static typing of &quot;order by&quot; expressions in use cases</short_desc>
          <delta_ts>2008-01-21 17:45:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>1.0.1</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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="Nick Jones">nick</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          
          
          <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>12443</commentid>
    <comment_count>0</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-10-13 17:10:40 +0000</bug_when>
    <thetext>FS 4.8.4 states &quot;the static semantics of a FLWORExpr expression with an OrderByClause is equivalent to the static semantics of an equivalent FLWORExpr in which the OrderByClause is replaced by a call to the gt comparison over the corresponding OrderSpec expression(s)&quot;.

Which I think means the following use cases should fail static type checking as they contains sequences on the lines indicated.


xmp-queries-results-q7
order by $b/title


xmp-queries-results-q12
order by $a/last, $a/first


rdb-queries-results-q2
order by $i/itemno


rdb-queries-results-q10
order by $highbid/itemno


rdb-queries-results-q13
rdb-queries-results-q16
order by $u/userid


rdb-queries-results-q16
let $descr := $i/description/text()
order by $descr</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12444</commentid>
    <comment_count>1</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-10-13 17:13:31 +0000</bug_when>
    <thetext>Last one should be:

rdb-queries-results-q18
let $descr := $i/description/text()
order by $descr</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13186</commentid>
    <comment_count>2</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-12-14 18:37:22 +0000</bug_when>
    <thetext>I see, your point, but not sure how to tackle it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13201</commentid>
    <comment_count>3</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-12-15 13:26:18 +0000</bug_when>
    <thetext>Adding exactly-one(...) should work. I can&apos;t think of any more elegant solution which will type-check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16566</commentid>
    <comment_count>4</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2007-09-14 09:34:53 +0000</bug_when>
    <thetext>A fix has been attempted in CVS, XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to CLOSED. Otherwise, reopen this report. If no feedback is returned within two weeks, status will be changed to CLOSED. Thanks for reporting!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16981</commentid>
    <comment_count>5</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2007-10-02 10:41:01 +0000</bug_when>
    <thetext>Thanks. Most of them are fixed, but there are still problems with:

rdb-queries-results-q2:
order by $i/itemno


Also, there are the same problems (which I failed to include in my original report) for

rdb-queries-results-q1:
order by $i/itemno

similarly, while the problem reported in rdf-queries-results-q18, there is a similar problem in the line:
order by $u/name</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18443</commentid>
    <comment_count>6</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2008-01-21 17:45:17 +0000</bug_when>
    <thetext>Specific static typing tests have been added to CVS</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>