1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <xsl:template name="traiter_lot">
<xsl:param name="total"/>
<xsl:param name="position"/>
<xsl:choose>
<xsl:when test="$position <= count(//Lot)">
<xsl:variable name="prixl"><xsl:value-of select="//Lot[position()=$position]/PrixLot"/></xsl:variable>
<xsl:variable name="nbl"><xsl:value-of select="//Lot[position()=$position]/NbLot"/></xsl:variable>
.... affichage d'un sous-total article ....
<xsl:call-template name="traiter_lot">
<xsl:with-param name="total"><xsl:value-of select="$total+$prixl * $nbl"/></xsl:with-param>
<xsl:with-param name="position"><xsl:value-of select="$position+1"/></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
... affichage total...
</xsl:otherwise> |