This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Determining last node



> From: "Larry Garfield" <lgarfiel@students.depaul.edu>
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]