I think that //e[p1][3] describes the third of the list of "e" elements in the document that satisfy [p1]; is this correct? In other words: //e[p1][p2] != //e[p2][p1] The W3 specification (http://www.w3.org/TR/1999/REC-xpath-19991116) is VERY ambiguous about this point: in 2.5 Abbreviated Syntax, it gives these examples: para[@type="warning"][5] selects the fifth para child of the context node that has a type attribute with value warning para[5][@type="warning"] selects the fifth para child of the context node if that child has a type attribute with value warning However in 2 Location Paths, it gives these examples: child::para[attribute::type='warning'][position()=5] selects the fifth para child of the context node that [child] has a type attribute with value warning child::para[position()=5][attribute::type="warning"] selects the fifth para child of the context node if that child has a type attribute with value warning Given the typo in this latter pair of examples, I prefer the first pair. Thank you for your attentionReceived on Tuesday, 8 June 2004 14:39:23 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:55 GMT