|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: again position()?
At 03:30 19-06-2001, Daniel Bauke wrote:
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 strongly recommend a reference like Mike Kay's _XSLT Programmer's Reference_; that will save you a lot of silly questions.
For example, current() is a well-defined XSLT function that does something entirely different, and the logical syntax is nothing like C's. Try: <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>The count() expression tests if the ancestor in question is the same as the first such at that level. There may be a more efficient way, but it's too late (early?) for me right now. 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 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
|

Cart








