This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Variable as Position Indicator
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] Variable as Position Indicator
- From: Mark Miller <storefront2000 at yahoo dot com>
- Date: Wed, 3 Jan 2001 13:51:51 -0800 (PST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
Greetings,
I am trying to create a 'Next Page' link in a set of
HTML pages. Each <section> has an attribute describing
that section <section subject="jdk">. I am using that
attribute to create the HTML page name for that
section.
The following code creates a variable that can be used
to select a specific section. When testing the code,
the $nextPage variable prints correctly (for testing),
but when it is placed as an index to the section tag,
it always reverts to the number '1'.
Any help would be appreciated. Thanks
Mark
Working Environment:
Windows 98
JDK 1.3
Xerces-1_2_1
Xalan-j_2_0_D05
CODE SAMPLE:
<!-- Create the 'Next Page' navigation location -->
<xsl:variable
name="currentPage"><xsl:number/></xsl:variable>
<xsl:variable name="nextPage"><xsl:value-of
select="$currentPage + 1"/></xsl:variable>
<!-- VERIFY THE CORRECT NUMBER (THIS WORKS) -->
<xsl:value-of select="$nextPage"/>
<!-- USE NUMBER FOR SPECIFIC LOCATION (THIS DOES NOT
WORK) -->
<xsl:value-of
select="//section[$nextPage]/@subject"/>.html
END CODE SAMPLE
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list