This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: difficulties with the position() function and xpath statements
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] difficulties with the position() function and xpath statements
- From: "Hunsberger, Peter" <Peter dot Hunsberger at stjude dot org>
- Date: Fri, 2 Nov 2001 13:26:09 -0600
- Reply-To: xsl-list at lists dot mulberrytech dot com
> However, I get two
> different numbers assigned (and thus my html links don't work). Any ideas
> on how to get around this? I've included a simple example below.
Stash the number in a variable and pass it as a parameter. I do this with
generated id's which might give you even better semantics, unless you need
the file names to be the same from run to run? Eg:
<xsl:variable name="cur-id" select="generate-id()"/>
<xsl:apply-templates select="gunk">
<xsl:with-param name="cur-id" select="$cur-id"/>
passing the cur-id parameter around as needed...
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list