Subject: RE: [xsl] [Xpath] Finding the *first* preceding sibling From: "Michael Kay" <mhk@xxxxxxxxx> Date: Fri, 4 Apr 2003 16:20:29 +0100 |
I tried > '/para/node()[preceding-sibling::blink[1]]' but it gives > exactly the same set of nodes. > > What did I miss in the Xpath specification? > If a node has a preceding sibling called "blink", then one of these will be the first, so the two conditions are equivalent. You want to test whether the first preceding sibling is called "blink": [preceding-sibling::*[1][self::blink]] Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [Xpath] Finding the *firs, David Carlisle | Thread | [xsl] Loosing children, Johan Thorèn (EAB) |
RE: [xsl] Use XSL to generate new X, Michael Kay | Date | RE: [xsl] Loosing children, Michael Kay |
Month |