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 :
 but impossible to realise the svg barrce code
after : xml fil after transformation by java programm
   <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"/>
xsl file :
   <xsl:variable name="w" select="codebarre/svg/@width"/>
   <xsl:variable name="h" select="codebarre/svg/@height"/>
   <svg xmlns="" 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"/>
Xavier Gibouin
Espace Mercoeur
8, rue Mercoeur
44000 Nantes
----- 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