[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Xpath and xsl position question

Subject: Xpath and xsl position question
From: Mark Ivs <markivs2003@xxxxxxxxx>
Date: Sun, 15 Jun 2003 20:15:24 -0700 (PDT)
xsl position
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.