hi this is my xsl code :
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:svg="http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
<xsl:variable name="x" select="10"/> <xsl:template name="codebarre"> <xsl:variable name="index" select="string-length(codebarre)"/> <xsl:param name="i" select="0"/> <xsl:if test="$i <
$index">
<xsl:choose> <xsl:when test="substring(codebarre,$i+1,1)='1'"> <fo:block><xsl:value-of select="$x"/></fo:block> <xsl:variable name="x" select="$x + 4"/> </xsl:when> <xsl:when test="substring(codebarre,$i+1,1)='2'"> <fo:block><xsl:value-of select="$x"/></fo:block> <xsl:variable name="x" select="$x + 1.5"/> </xsl:when> <xsl:when test="substring(codebarre,$i+1,1)='3'"> <fo:block><xsl:value-of select="$x"/></fo:block> <xsl:variable name="x" select="$x + 3"/> </xsl:when> <xsl:when test="substring(codebarre,$i+1,1)='4'"> <fo:block><xsl:value-of select="$x"/></fo:block> <xsl:variable name="x" select="$x + 1.5"/> </xsl:when> </xsl:choose> <xsl:call-template
name="codebarre">
<xsl:with-param name="i" select="$i+1"/> </xsl:call-template> </xsl:if>
</xsl:template> </xsl:stylesheet> this code always writes
10
10
10
10
10
...
$x is not incremented
any ideas?
thanks a lot
|
- Re: variable and svg Paul Washinger
- Quark workflow Joel Gwynn
- Re: Quark workflow clholm
- Re: Quark workflow Oleg Tkachenko
- RE: Quark workflow Stephan Wiesner
- RE: Quark workflow Joel Gwynn
- Re: Quark workflow Oleg Tkachenko
- RE: Quark workflow Joel Gwynn
- Re: Quark workflow Oleg Tkachenko
- RE: Quark workflow Joel Gwynn
- RE: incrementing variable xavier gibouin
- RE: incrementing variable Phil Dickinson
- Re: incrementing variable John Gentilin
- RE: incrementing variable Phil Dickinson
- Re: incrementing variable Oleg Tkachenko
- Re: incrementing variable xavier gibouin
- Re: incrementing variable J.Pietschmann