<?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>4604</bug_id>
          
          <creation_ts>2007-06-07 15:25:12 +0000</creation_ts>
          <short_desc>1.0.3dev: K2-LetExprWithout-20</short_desc>
          <delta_ts>2007-07-17 13:30:20 +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>unspecified</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="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>15318</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-06-07 15:25:12 +0000</bug_when>
    <thetext>I think there might be a typo in the catalog here.  The catalog is binding input-context1, but the query uses input-context.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15406</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2007-06-13 08:45:30 +0000</bug_when>
    <thetext>Yupp. A fix has been attempted in CVS, XQTS_current.zip is updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15608</commentid>
    <comment_count>2</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2007-06-26 13:28:22 +0000</bug_when>
    <thetext>I think there is another problem in this test K2-LetExprWithout-20. Either the input-context is bound to the wrong document, or the expected results are wrong.

The input document contains:

&lt;employees&gt;
  &lt;employee&gt;
    &lt;location&gt;Boston&lt;/location&gt;
    &lt;salary&gt;60000&lt;/salary&gt;
    &lt;deptno&gt;1&lt;/deptno&gt;
  &lt;/employee&gt;
  &lt;employee&gt;
    &lt;location&gt;Denver&lt;/location&gt;
    &lt;salary&gt;60000&lt;/salary&gt;
    &lt;deptno&gt;1&lt;/deptno&gt;
  &lt;/employee&gt;
  &lt;employee&gt;
    &lt;location&gt;Denver&lt;/location&gt;
    &lt;salary&gt;70000&lt;/salary&gt;
    &lt;deptno&gt;1&lt;/deptno&gt;
  &lt;/employee&gt;
  &lt;employee&gt;
    &lt;location&gt;Denver&lt;/location&gt;
    &lt;salary&gt;80000&lt;/salary&gt;
    &lt;deptno&gt;2&lt;/deptno&gt;
  &lt;/employee&gt;
  &lt;employee&gt;
    &lt;location&gt;Boston&lt;/location&gt;
    &lt;salary&gt;70000&lt;/salary&gt;
    &lt;deptno&gt;1&lt;/deptno&gt;
  &lt;/employee&gt;
&lt;/employees&gt;

The query is:
let $emps := $input-context1//employee[location = &quot;Denver&quot;]

for $d in distinct-values($emps/deptno)
let $e := $emps[deptno = $d]
return &lt;dept&gt;
    &lt;deptno&gt;{$d}&lt;/deptno&gt;
    &lt;headcount&gt; {count($e)} &lt;/headcount&gt;
    &lt;payroll&gt; {sum($e/salary)} &lt;/payroll&gt;
&lt;/dept&gt;

Which I think means we should be returning &lt;dept&gt; nodes for deptno 1 and 2 as these both have employees in Denver. Whereas in the expected results there are just results for deptno 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15649</commentid>
    <comment_count>3</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2007-06-27 13:43:16 +0000</bug_when>
    <thetext>A fix has been attempted in CVS, XQTS_current.zip is updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15836</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-07-17 13:30:20 +0000</bug_when>
    <thetext>Thanks</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>