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

XML Query Use Case REF

From: Michael Dyck <MichaelDyck@home.com>
Date: Sun, 11 Mar 2001 00:35:05 -0800
Message-ID: <3AAB38B9.7BD032A1@home.com>
To: www-xml-query-comments@w3.org
XML Query Use Cases
W3C Working Draft 15 February 2001

Use Case REF

1.9.4.1 Q1

For this query alone, the Expected Result is not embedded in a <result>
element. Is that intentional?

1.9.4.* Q1, Q5, Q6, Q7, Q8

In the Solution in XQuery, occurrences of "name" should be changed to "@name".

1.9.4.* Q3, Q4, Q5

In the Solution in XQuery, occurrences of "job" should be changed to "@job".

1.9.4.3 Q3

The Solution in XQuery does not find that John is a parent of an athlete
(Helen), because there is no appropriate binding for $s. (He has no spouse.)
Instead, maybe:
    <result>
        FOR $a IN document("census.xml")//person[@job = "Athlete"],
            $p IN $a/..[name()="person"] | $a/../@spouse -> person
        RETURN shallow($p)
    </result>

1.9.4.8 Q8

Note that if Dave's spouse happened to be one of the top-level persons, the
Solution in XQuery would bind $sp to the <census> element.  So you should
maybe change
    $s/..
to
    $s/..[name()="person"]

-Michael Dyck
Received on Sunday, 11 March 2001 03:40:36 UTC

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