This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I think there might be a typo in the catalog here. The catalog is binding input-context1, but the query uses input-context.
Yupp. A fix has been attempted in CVS, XQTS_current.zip is updated.
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.
A fix has been attempted in CVS, XQTS_current.zip is updated.
Thanks