W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > March 2001

XML Query Use Case SEQ

From: Michael Dyck <MichaelDyck@home.com>
Date: Mon, 05 Mar 2001 00:38:21 -0800
Message-ID: <3AA3507D.C879F942@home.com>
To: www-xml-query-comments@w3.org
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:12 UTC