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 11700 - [XQTS] ForExpr029's is-XPath2 should be false
Summary: [XQTS] ForExpr029's is-XPath2 should be false
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Benjamin Nguyen
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-09 00:27 UTC by Michael Dyck
Modified: 2011-06-29 01:48 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2011-01-09 00:27:55 UTC
ForExpr029's query is basically
    for $var in (1,2) for $var in (2,2) return $var * $var
for which the expected output is
    4 4 4 4
which is fine for XQuery, but the test-case has is-XPath2="true", implying that an XPath2 processor would give the same result. In fact, an XPath2 processor should raise a syntax error on this expression, because XPath doesn't allow multiple adjacent 'for' clauses. (It would be valid XPath if there were an extra 'return' before the second 'for'.)

So the is-XPath2 attribute for this test-case should instead have the value "false".
Comment 1 Benjamin Nguyen 2011-01-25 14:23:01 UTC
I agree, we can either remove the is-XPath2 or we can rewrite the test. As a matter of fact I'd rewrite it as follows which seems closer to the original spirit :

for $var in (1,2), $var in (2,2) return $var * $var

I'm fine with either solution.
Comment 2 Michael Dyck 2011-01-25 20:08:45 UTC
I'd prefer the query to change as you suggest, and the test-case to stay is-XPath2="true".
Comment 3 Michael Dyck 2011-06-29 01:47:50 UTC
I've made the change suggested in Comment 1, and committed it.
Consequently, I'm closing the bug as resolved-fixed.