|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: find previous node at the same level
Hi > <xsl:apply-templates select="item"> > if previous node is group... then do blah > > else if previous node is item.... then do blah > </xsl:apply-templates> > > So when I am in item template how do I find what the > previous node is ? (In my example it will be the item > one nodes) See <http://www.w3.org/TR/xpath#axes>. <xsl:choose> <xsl:when test="preceding-sibling::*[1][self::group]"> do blah </xsl:when> <xsl:when test="preceding-sibling::*[1][self::item]"> do blah </xsl:when> </xsl:choose> Cheers, Jarno - Linnunradan käsikirja liftareille: Osa 19 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
|






