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