Subject: Re: //* and position() From: Mike Brown <mike@xxxxxxxx> Date: Thu, 7 Sep 2000 12:13:54 -0600 (MDT) |
Gary L Peskin wrote: > In the case of //*[position() < 3], this is an abbreviation for > > /descendents-or-self::node()/child::*[position() < 3] > > In other words, this will select any node that is one of the first two > children of another node. > [...] > In the case of $all_elements[position() < 3] (equivalent to > (//*)[position() < 3]), this will select the first two items in the > node-set $all-elements. I saw this in the XPath spec when I was looking for the answer, but it just didn't click. Even when I considered that // was an abbreviation, I couldn't see how $foo[bar] was different from //*[bar] if $foo was //*. Your explanation makes more sense. Thank you. - Mike ____________________________________________________________________ Mike J. Brown, software engineer at My XML/XSL resources: webb.net in Denver, Colorado, USA http://www.skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: //* and position(), Gary L Peskin | Thread | RE: //* and position(), sara . mitchell |
RE: Grouping by a piece of a date, Jeff Saylor | Date | dynamically changing the XSL Node, Krishnamurthy, Rama |
Month |