- From: Michael Dyck <MichaelDyck@home.com>
- Date: Mon, 19 Mar 2001 01:44:17 -0800
- To: www-xml-query-comments@w3.org
XML Query Use Cases
W3C Working Draft 15 February 2001
Use Case REF
1.9.4.* Q2, Q11
In the Solution in XQuery, occurrences of "name" should be changed to "@name".
1.9.4.11 Q11
In the Solution in XQuery, consider the expression:
IF ... THEN ... ELSE $e UNION ...
XQuery Appendix B says that IF..THEN..ELSE is at precedence level 6, whereas
UNION is at level 10. Accordingly, the expression would be parsed as
( IF ... THEN ... ELSE $e ) UNION ...
which is not what you want. Instead, you need to parenthesize the UNION
subexpression:
IF ... THEN ... ELSE ( $e UNION ... )
(or else change the precedences, or else mandate an ENDIF or FI keyword).
The Expected Result has <descendant> elements, but the Solution in XQuery
generates <person> elements.
The Expected Result has an attribute named "kids" where the Solution in XQuery
generates (and sorts by) an attribute named "nkids".
The Expected Result wraps the result in a <result> element, but the Solution
in XQuery doesn't.
The Expected Result doesn't have an element for Joe (he's not one of his own
descendants), but the Solution in XQuery generates one.
-Michael Dyck
Received on Monday, 19 March 2001 04:48:48 UTC