[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: //* and position()
And I second the applause...this was very clear! Sara > -----Original Message----- > From: Mike Brown [mailto:mike@xxxxxxxx] > Sent: Thursday, September 07, 2000 11:14 AM > To: xsl-list@xxxxxxxxxxxxxxxx > Subject: Re: //* and position() > > > 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|