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: Incrementation i=i+1


> Is there something in xsl for incrementing
> a number like i = i + 1 ?
>
> I need to use that as a function for <a
> href="link-to-somewhere?para=i>Link</a>

XSLT doesn't have an assignment statement, if you want to understand why,
read Chapter 8 of my XSLT Programmer's Reference.

You can achieve nearly all numbering requirements using either
<xsl:number/>, count(), or position(). In the rare cases where these aren't
adequate, you can achieve the required effect using a two-stage
transformation, or a recursive template that calls itself with a parameter:

<xsl:with-param name="i" select="$i+1"/>

Mike Kay


 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]