[Home] [By Thread] [By Date] [Recent Entries]
Russ,
In select="*[not(self::title)]", the subexpression "not(self::title)" is evaluated relative to each of the nodes selected by the XPath on which the predicate operates (the bracketed expression -- "filter expression" in XPath 2.0 parlance). That is, relative to whatever is selected by "*". This is so that expressions like "p[@class='big']" (short for "child::p[attribute::class='big']") will work the way we want them to. Another thing to keep in mind is that the logic of "*[not(self::title)]" works because there's an implicit type cast going on -- "self::title" returns a node set (either empty or not, depending on whether there are any such nodes), which becomes a Boolean true or false, which is then inverted using the Boolean function "not()". A final note, glossing David -- you never have to say "./title" for the same reason you don't have to say "./././title". Cheers, Wendell On 1/13/2011 3:19 PM, russurquhart1@xxxxxxxxxxx wrote:
|

Cart



