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

Re: preceding-sibling

Subject: Re: preceding-sibling
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 11 Aug 2004 10:42:35 +0100
preceding sibling
> self::preceding-sibling/person"/>.

The syntax for an axis is (in the basic case) axis::name and finds all
elements called name on tha axis, so the above uses the self axis (which
just has the current node) and finds all elements called
preceding-sibling then finds children of that called person
(It is an abreviated form of
self::preceding-sibling/child::person
in other wirds if teh current element is called preceding-sibling
it finds its children called person, otherwise it is empty.

If you want preceding sibling's called person that is

preceding-sibling::person

but I think you want 

preceding-sibling::section/person

Note that preceding-sibling::section selects _all_ preceding siblings,
and preceding-sibling::section/person selects all their children, but if
you
use xsl:value-of it will (always) just take the first selected node in
document order.

I think you want the _immediately_ preceding sibling, so that woul dbe

preceding-sibling::section[1]/person

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.