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

Re: Determining last node

Subject: Re: Determining last node
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Tue, 14 Aug 2001 22:28:25 +0200
last node context xsl
> From: "Larry Garfield" <lgarfiel@xxxxxxxxxxxxxxxxxxx>
> I tried using all three method, in both the chapter and sect1 sections.
Oops, i should have written "with the cahpter node to be examined
as context node" Sorry for my bold statement about the expressions
being context free...

Try $chapter/following::chapter
Or with some more simplifications (hopefully :-) to your template

 <xsl:template match="call:insert[@id='NavbarDesktop']">
   <xsl:param name="chapter"/>
   <xsl:param name="chNum"/>
   <xsl:text>[ </xsl:text>
   <xsl:if test="$chapter/preceding::chapter">
     <a href="chap{$chNum-1}.html">
	<xsl:value-of select="$chapter/preceding::chapter/title"/>
     </a>
     <xsl:text> | </xsl:text>
   </xsl:if>
   <a href="index.html">Table of Contents</a>
   <xsl:if test="$chapter/following::chapter)">
     <xsl:text> | </xsl:text>
     <a href="chap{$chNum+1}.html">
	<xsl:value-of select="$chapter/following::chapter/title"/>
     </a>
   </xsl:if>
   <xsl:text> ]</xsl:text>
 </xsl:template>

Untested. May have degraded functionality. Let me know if this works.

HTH
J.Pietschmann

 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.