I have this xsl file
I give a default value to a parameter pmStyle = 1
in my xml file I have <note page="panier" num="1" style="1">
then I want to change the style depending on this attributes
it works but only for my first element
with <div id="note{@style}"> I get <div id="note1">
but others
<div class="titreNote{@style}"> are all <div class="titreNote">
.... the {@style} doesn't work
do you know why ?
thank you
-------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl

utput method="html"/>
<xsl

aram name="pmPage"/>
<xsl

aram name="pmNum"/>
<xsl

aram name="pmId"/>
<xsl

aram name="pmTarget"/>
<xsl

aram name="pmStyle">1</xsl

aram>
<xsl:template match="/">
<xsl:for-each select="//notes/note[@page=$pmPage and @num=$pmNum]">
<div id="note{@style}">
<xsl:if test="titre/text()">
<div class="titreNote{@style}"><xsl:value-of select="titre"/></div>
</xsl:if>
<xsl:for-each select="paras/para">
<xsl:choose>
<xsl:when test="position()=1">
<div class="noteH{@style}">
<xsl:value-of select="."/>
</div>
</xsl:when>
<xsl:when test="position()=last()">
<div class="noteB{@style}">
<xsl:value-of select="."/>
</div>
</xsl:when>
<xsl

therwise>
<div class="noteM{@style}">
<xsl:value-of select="."/>
</div>
</xsl

therwise>
</xsl:choose>
</xsl:for-each>
<xsl:for-each select="liens/lien[@id=$pmId and @target=$pmTarget]">
<a href="{url}" class="lnkNote{@style}">
<xsl:value-of select="texte"/>
</a>
</xsl:for-each>
</div>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>