As my xml file is before traited by a java program in odrer generate other tag. This one will completely generate tag for creating barrecode so
 
before : xml file :
<barrcecode>012341223</barrcode>
 but impossible to realise the svg barrce code
 
after : xml fil after transformation by java programm
<barrecode>
<number>1123412134121134211231412134242411</number>
   <svg height="50pt" width="400pt"/>
   <rec width="1.5" x="4.0"/>
   <rec width="1.5" x="7.0"/>
   <rec width="1.5" x="10.0"/>
   <rec width="1.5" x="14.5"/>
   <rec width="1.5" x="100"/>
    ...
</barrcode>
 
xsl file :
 
<fo:instream-foreign-object>
   <xsl:variable name="w" select="codebarre/svg/@width"/>
   <xsl:variable name="h" select="codebarre/svg/@height"/>
 
   <svg xmlns="http://www.w3.org/2000/svg" width="{$w}" height="{$h}" x="0">
    <g id="codebarre" fill="#000000">
     <xsl:for-each select="codebarre/rec">
     <xsl:variable name="w" select="@width"/>
     <xsl:variable name="x" select="@x"/>
     <rect x="{$x}" width="{$w}" height="50"/>
     </xsl:for-each>
    </g>
   </svg>
  </fo:instream-foreign-object>
 
 
Xavier Gibouin
Axonie
Espace Mercoeur
8, rue Mercoeur
44000 Nantes
02.40.48.53.23
[EMAIL PROTECTED]
----- Original Message -----
Sent: Wednesday, November 06, 2002 1:45 PM
Subject: Re: incrementing variable

Phil Dickinson wrote:

> John is right about not being able to change variables and I think that
> in order to achieve the effect you want, you should consider using some
> Java code inside your XSL.

Well, extensions are especially good as last resort, but incrementing
variables in a side effect free langauge like xslt sounds very ugly. I
wouldn't suggest people to go this way, but instead to stop thinking
procedurally and to start using real power of xslt.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel

Reply via email to