W3C home > Mailing lists > Public > www-xpath-comments@w3.org > October to December 2002

semantic meaning of predicates

From: Tianzhi Yang <tyang@firstrain.com>
Date: Mon, 4 Nov 2002 12:35:15 -0500 (EST)
Message-ID: <C1C4A3C0FEE62A45A35BE7890264FF27A66494@monsoon.us.ny.firstrain.com>
To: <www-xpath-comments@w3.org>

Hi, I got one question regarding the semantic meaning of predicates.
For example, in message:

1. Is there a difference between (a)./a[b/id='1' and b/id='2'] and (b)/a[b[id='1' and id='2']

1. Is there a difference between (c)/a[b/id='1' and b/id='3'] and(d) /a[b[id='1' and id='3']

I think that the difference in both cases are: the earlier xpath ((a) and (c))tries to select an "a" who has a child "b" satisfy one condition and another "b" satisfy the other, no matter these two "b"s are the same.
But the later ((b) and (d)) xpath tries to select an "a" who has a single child "b" that satisfy two conditions simultaneously.

So my conclusion is that all XPATHs are satisfied by the given message except for (d).
Is it correct? If not, is there a way to expression the condition previously given?


Received on Monday, 4 November 2002 13:27:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:02:15 UTC