|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Xpath and xsl position question
Hello, Here's how my xml looks. <header>header one</header> <chapter>H1 chapter one</chapter> <chapter>H1 chapter two</chapter> <chapter>H1 chapter three</chapter> <header>header two</header> <chapter>H2 chapter one</chapter> <chapter>H2 chapter two</chapter> <header>header three</header> <chapter>H3 chapter one</chapter> <chapter>H3 chapter two</chapter> <chapter>H3 chapter three</chapter> I have 2 questions. 1. When I am inside chapter template, how do I know if it's the last chapter after each header ? Example: if( H1 chapter three H2 chapter two H3 chapter three) then do...blah 2. How do I find the position of header when I am inside chapter template ? I tried <xsl:value-of select="../position()"/>. But that didn't help. <xsl:apply-template match="chapter"> 1. if(last chapter node) then do..... blah 2. position of header ? </xsl:template> Your help is appreciated. Thanks a lot. Mark __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com 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








