[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] RE: xsl for


Subject: [xsl] RE: xsl for
From: "Philippe LAPLANCHE" <philippe.laplanche@xxxxxxxxxxxx>
Date: Fri, 7 Apr 2006 16:54:40 +0200

Sorry I sent the mail before I finished writing it.

This may appear silly but I don't know how to do this in a clean way
with xsl ...

My input is

<pageBrowser startPage="5" pageSize="10"/>

And I want this output :

<a href="toto.htm?skip=50">5</a>
<a href="toto.htm?skip=60">6</a>
<a href="toto.htm?skip=70">7</a>
<a href="toto.htm?skip=80">8</a>
<a href="toto.htm?skip=90">9</a>
<a href="toto.htm?skip=100">10</a>
<a href="toto.htm?skip=110">11</a>
<a href="toto.htm?skip=120">12</a>
<a href="toto.htm?skip=130">13</a>
<a href="toto.htm?skip=140">14</a>

I mean I want to use a loop somewhere and I don't want to have

<xsl:template match="pageBrower">
	<a href="toto.htm?skip={@startPage*@pageSize}"><xsl:value-of
select="@startPage"/></a>
	<a href="toto.htm?skip={(@startPage+1)*@pageSize}"><xsl:value-of
select="@startPage+1"/></a>
	<a href="toto.htm?skip={(@startPage+2)*@pageSize}"><xsl:value-of
select="@startPage+2"/></a>
	<a href="toto.htm?skip={(@startPage+3)*@pageSize}"><xsl:value-of
select="@startPage+3"/></a>
	...
</xsl:template>

Thanks in advance

Philippe


Current Thread
  • [xsl] RE: xsl for
    • Philippe LAPLANCHE - Fri, 7 Apr 2006 16:54:40 +0200 <=
      • <Possible follow-ups>
      • cknell - Fri, 07 Apr 2006 11:30:38 -0400
Keywords
xsl