Subject: Re: [xsl] again position()? From: "Christopher R. Maden" <crism@xxxxxxxxx> Date: Tue, 19 Jun 2001 03:45:59 -0700 |
at first: thanks for all earlier answers -- i'll try to use them later.. i'm doing my xsl pages after hours, so i don't have much time for it the more it's not so intuitive language :-)
i'd like to ask for a solution for such test: if ((current("part") == 1) && (current("chapter") == 1)) intro="true"; in xslt.
by current() i mean a function which returns current position of a tag in xpath tree.
<xsl:if test="count(ancestor::part|ancestor::part/../part[1]) = 1 and count(ancestor::chapter|ancestor::chapter/../chapter[1]) = 1"> <xsl:attribute name="intro">true</xsl:attribute> </xsl:if>
HTH, Chris your solution for espresso-pizza-and-Zappa-fueled 24-hour XSLT support -- Christopher R. Maden, XML Consultant DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training <URL: http://crism.maden.org/consulting/ > PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] again position()?, Daniel Bauke | Thread | [xsl] XSL for WMLscript, Javier Martin |
[xsl] again position()?, Daniel Bauke | Date | [xsl] XSL for WMLscript, Javier Martin |
Month |