This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4604 - 1.0.3dev: K2-LetExprWithout-20
Summary: 1.0.3dev: K2-LetExprWithout-20
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-07 15:25 UTC by Tim Mills
Modified: 2007-07-17 13:30 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-06-07 15:25:12 UTC
I think there might be a typo in the catalog here.  The catalog is binding input-context1, but the query uses input-context.
Comment 1 Frans Englich 2007-06-13 08:45:30 UTC
Yupp. A fix has been attempted in CVS, XQTS_current.zip is updated.
Comment 2 Nick Jones 2007-06-26 13:28:22 UTC
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:

<employees>
  <employee>
    <location>Boston</location>
    <salary>60000</salary>
    <deptno>1</deptno>
  </employee>
  <employee>
    <location>Denver</location>
    <salary>60000</salary>
    <deptno>1</deptno>
  </employee>
  <employee>
    <location>Denver</location>
    <salary>70000</salary>
    <deptno>1</deptno>
  </employee>
  <employee>
    <location>Denver</location>
    <salary>80000</salary>
    <deptno>2</deptno>
  </employee>
  <employee>
    <location>Boston</location>
    <salary>70000</salary>
    <deptno>1</deptno>
  </employee>
</employees>

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

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

Which I think means we should be returning <dept> 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.
Comment 3 Frans Englich 2007-06-27 13:43:16 UTC
A fix has been attempted in CVS, XQTS_current.zip is updated.
Comment 4 Tim Mills 2007-07-17 13:30:20 UTC
Thanks