W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2004

Re: XQuery Predicate syntax

From: Murali Mani <mani@CS.UCLA.EDU>
Date: Fri, 23 Apr 2004 05:44:28 -0700 (PDT)
To: Jeni Tennison <jeni@jenitennison.com>
Cc: www-ql@w3.org, Philippe Michiels <philippe.michiels@ua.ac.be>
Message-ID: <Pine.GSO.4.58.0404230534120.7333@panther.cs.ucla.edu>


Thanks for the responses.. Thanks especially for illustrating text () and
string () functions..

> Note: The original question used the query //student["Adam"]/advisor.
> It's not clear what XML structure that is supposed to query. If it's:
>
>   <student>Adam<advisor>Benny</advisor></student>
>
> then you need //student[text()[1] = "Adam"]/advisor (test the first
> child text node against the string), but this is badly designed XML
> (mixed content for data-oriented information), so I assume that this
> isn't what was wanted.

The above was the example in mind, even I believe it is bad design for
"data oriented applications"; but that was not the concern..

Do we need text ()[1] = "Adam", isn't text () = "Adam" sufficient? I
thought a predicate expression such as

(x op y) is true, if (x op y') is true for some y' in y... Am I right??

what is the semantics of (x op y) if x is a collection? is it valid for x
to be a collection?

best, murali.
Received on Friday, 23 April 2004 08:45:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:19 GMT