[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! 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
|