XML Query Use Case SEQ

XML Query Use Cases
W3C Working Draft 15 February 2001

1.3 Use Case SEQ:

(1)
For each query, the Expected Result is embedded in a <result> element.
However, none of the Solutions in XQuery construct this element.

(2)
In query 4 (1.3.4.4), in the Solution in XQuery,
    document("report1")
should probably be
    document("report1.xml")
as in all the other queries.

(3)
Again in query 4, in the Solution in XQuery, consider the expression:
    EVERY $a IN ... SATISFIES $a AFTER ...
XQuery Appendix B says that Quantifiers (SOME/EVERY x IN y SATISFIES z) are
at precendence level 6, whereas AFTER (x AFTER y) is at level 7. Thus, the
expression should be parsed as
    ( EVERY $a IN ... SATISFIES $a ) AFTER ...
which is not what you want. (It doesn't even pass type-checking.) Instead,
you need to parenthesize the AFTER subexpression:
    EVERY $a IN ... SATISFIES ( $a AFTER ... ) 

(4)
Still in query 4, to express "the first Incision",
    $proc//incision[1]
should probably be changed to
    ($proc//incision)[1]
as in other queries.  I think they happen to be equivalent for this
particular DTD, but you wouldn't want to encourage sloppy thinking.

-Michael Dyck

Received on Monday, 5 March 2001 03:41:57 UTC