W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2007

[Bug 4604] 1.0.3dev: K2-LetExprWithout-20

From: <bugzilla@wiggum.w3.org>
Date: Tue, 26 Jun 2007 13:28:22 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1I3B5i-00059H-VN@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4604





------- Comment #2 from nick@cbcl.co.uk  2007-06-26 13:28 -------
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.
Received on Tuesday, 26 June 2007 13:28:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:33 UTC