RE: Determining last node
> -----Original Message----- > Larry, > > Instead of having a seperate template for the data do the work in the > following block(unless you have reason not to?) > > <xsl:for-each select="book/chapter"> > .....call to template > </xsl:for-each> > > > Tag, then you can do something like the following.. <snip> There is actually a lot more going on that necessitates the separate template. The <xsl:choose> statement is called from a flag element inside a template file, which then calls back over to the source file to get the content. The rest of the template file has its own content, in addition to other such flag elements that do other things. I just left that mess out of my original mail to save space/time/sanity. :-) The reason I'm using a for-each is that each chapter is being redirected (via Xalan extensions) to a separate file. (As is each sect1, in a second pass through the tree.) So, I have a for-each chapter, set redirect file, call the template file and process it. (Most tags in the template file are passed through with the identity transform, with only certain special tags tripping a call back into the source file.) Is there a better way to do it that will allow me to determine if there is a "next chapter" or "previous chapter" to link to in the nav bar on each page? --Larry Garfield 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