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

Re: missing XPath axis

  • From: David Carlisle <davidc@nag.co.uk>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Sat, 24 Sep 2011 18:07:23 +0100

Re:  missing XPath axis
On 24/09/2011 16:56, John Cowan wrote:
> Another point is that an axis has to have unambiguous ordering (okay,
> there's the namespace axis, but who cares about that?)  It is not
> clear where the self should go on a child-or-self axis: first, last,
> in the middle?

well actually it would have to go first (as it would be a forward axis 
so return nodes in document order), but mainly I suspect it's not 
provided as it's hard to find a natural use case for it and it's longer 
to type that .|node() which would be the equivalent (if used as the 
first step (or in any step in xpath 2).

ancestor-or-self:: is used often for finding the nearest in-scope 
attribute value (for lang or id of nearest containing section, etc.)

descendant-or-self:: is, as Ken just commented, used for defining // 
(although actually that was probably a mistake, it was done that way 
intentionally so //p[1] meant the first p in each section, whereas most 
people probably expect // to be defined as descendant:: and have //p[1] 
mean the first p in the document, but that's all water under the bridge 
now:-)


David


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.