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]

Variable as Position Indicator


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


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