|
Hi
this is my code for genrate code barre from a
number
<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:template name="codebarre"> <xsl:variable name="index" select="string-length(codebarre)"/> <xsl:variable name="x"/> <xsl:param name="i"
select="0"/>
<xsl:if test="$i <
$index">
<xsl:choose> <xsl:when test="substring(codebarre,$i+1,1)='1'"> <svg xmlns="http://www.w3.org/2000/svg"> <rect height="50" width="4.0" x="$x" y="0.0"/> </svg> <xsl:variable name="x" select="$x+4"/> <fo:block>large noir</fo:block> </xsl:when> <xsl:when test="substring(codebarre,$i+1,1)='2'"> <svg xmlns="http://www.w3.org/2000/svg"> <rect height="50" width="1.5" x="$x" y="0.0"/> </svg> <xsl:variable name="x" select="$x+1.5"/> </xsl:when> <xsl:when test="substring(codebarre,$i+1,1)='3'"> <xsl:variable name="x" select="$x+3"/> </xsl:when> <xsl:when test="substring(codebarre,$i+1,1)='4'"> <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> but fop doesn't want assign the value of $x in
"rec" tag
any ideas ??
thanks a lot
|
- How to show PDF file in jsp page II. Jiri_Nejedly
- Re: How to show PDF file in jsp page II. Oleg Tkachenko
- Re: variable and svg xavier gibouin
- Re: variable and svg J.Pietschmann
- Re:xsl loop xavier gibouin
- Re: xsl loop Oleg Tkachenko
- Re: How to show PDF file in jsp page II. Jiri_Nejedly
- Re: How to show PDF file in jsp page II. Marko Petersen
- Re: How to show PDF file in jsp page II. Oleg Tkachenko
