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

RE: my nearest sibling

Subject: RE: my nearest sibling
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 6 Jul 1999 18:42:16 +0100
RE: my nearest sibling
> Any volunteers to express "go up and get my nearest older sibling"?
> In this example:
> 
>  <list type="gloss"><label><gi>front</gi></label><item>contains any
>  prefatory matter (headers, title page, prefaces, dedications, etc.)
>  found before the start of a text proper.</item>
> 
> when processing <item>, I want to get my paws on the associated
> <label>.
> 
<xsl:apply-templates select="from-preceding-siblings(label[1])"/>

Or you could try:

<xsl:variable name="here"><xsl:number count="*"/></xsl:variable>
<xsl:apply-templates select="../*[$here - 1]"/>

(Nearly forgot the space around the minus sign - memories of COBOL!)

Mike Kay


 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.