[Home] [By Thread] [By Date] [Recent Entries]
Andrew Welch wrote:
Not quite. If // was short for /descendant::, then //*/@foo would still not be equivalent. That's because, in XPath as actually designed, /descendant::*/@foo isn't the same as //@*. The former excepts attributes of the context node, whereas //@* also includes attributes of the context node.currently // expands to /descendant-or-self::node()/ which is not owhat one would first think of, but it works consistently without depending on the following step. And that expansion is at the level of expression terms not syntax fragments. So, instead, you'd have to write (@* | ./descendant::*/@*). In that case, the actual definition of // is handy. Evan
|

Cart



