[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: //* and position()

Subject: Re: //* and position()
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 7 Sep 2000 12:13:54 -0600 (MDT)
lt 3 abbreviation
Gary L Peskin wrote:
> In the case of //*[position() &lt; 3], this is an abbreviation for
> 
> 	/descendents-or-self::node()/child::*[position() &lt; 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() &lt; 3] (equivalent to
> (//*)[position() &lt; 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.