- From: Tianzhi Yang <tyang@firstrain.com>
- Date: Mon, 4 Nov 2002 12:35:15 -0500 (EST)
- To: <www-xpath-comments@w3.org>
Hi, I got one question regarding the semantic meaning of predicates. For example, in message: <a> <b> <id>1</id> <id>2</id> </b> <b> <id>3</id> <id>4</id> </b> </a> 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? Thanks Tianzhi
Received on Monday, 4 November 2002 13:27:52 UTC