OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xpath axes



At 01/01/16 13:44 -0800, you wrote:
>I've been doing a lot of XSLT development and I was wondering why there is
>no siblings

Symmetry perhaps?  All other axes are proximity ordered from the current 
node, which this couldn't be ... I suppose document order would be the only 
sensible order of an "all siblings" axis.

Of course the set is "( preceding-siblings::() | following-siblings::node() 
)" which is all siblings in document order ... but that cannot be used as a 
step in a multiple step location path.

>and siblings-or-self axis.

This is just "../node()" which is also in document order.

>I suspect that the most common use would be to do more sophisticated
>validation (ex there can only be one foo element with a role attribute of
>bar).

count( ../foo[@role='bar'] ) = 1

I hope this helps.

............... Ken


--
G. Ken Holman                      mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.               http://www.CraneSoftwrights.com/m/
Box 266, Kars, Ontario CANADA K0A-2E0     +1(613)489-0999   (Fax:-0995)
Web site:     XSL/XML/DSSSL/SGML/OmniMark services, training, products.
Book:   Practical Transformation Using XSLT and XPath ISBN1-894049-05-5
Article: What is XSLT? http://www.xml.com/pub/2000/08/holman/index.html
Next public instructor-led training:             2001-01-27,2001-02-21,
-                            2001-02-27/03-01,2001-03-05/07,2001-03-21,
-                                   2001-04-06/07,2001-05-01,2001-09-19