P
Petterson Mikael
Hi,
I call the sequenceNameString template with:
<xsl:when test="child::*[name() = 'sequence']">
<xsl:call-template name="sequenceNameString">
<xsl:with-param name="sequenceName" select="@name"/>
<xsl:with-param name="maxCount" select="sequence/maxLength"/>
<xsl:with-param name="value" select="0"/>
</xsl:call-template></xsl:when>
I can check that the parameter values are sent to the template.
However the incrementation of value does not happen.
I get the following only once( example):
eAgchCodes_name0
but want:
eAgchCodes_name0
eAgchCodes_name1
eAgchCodes_name2
.......
Any ideas why?
cheers,
//Mikael
!-- Template that create "<sequencename>_name0", "<sequencename>_name1"..-->
<xsl:template name="sequenceNameString">
<xslaram name="sequenceName"/>
<xslaram name="maxCount"/>
<xslaram name="value"/>
<xslaram name="arrayMax" select="$maxCount - 1"/>
<xsl:if test="$value < $arrayMax">
<xsl:value-of
select="concat(concat($sequenceName,'_name'),$value)"/>
<xsl:call-template name="sequenceNameString">
<xsl:with-param name="value" select="$value + 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
I call the sequenceNameString template with:
<xsl:when test="child::*[name() = 'sequence']">
<xsl:call-template name="sequenceNameString">
<xsl:with-param name="sequenceName" select="@name"/>
<xsl:with-param name="maxCount" select="sequence/maxLength"/>
<xsl:with-param name="value" select="0"/>
</xsl:call-template></xsl:when>
I can check that the parameter values are sent to the template.
However the incrementation of value does not happen.
I get the following only once( example):
eAgchCodes_name0
but want:
eAgchCodes_name0
eAgchCodes_name1
eAgchCodes_name2
.......
Any ideas why?
cheers,
//Mikael
!-- Template that create "<sequencename>_name0", "<sequencename>_name1"..-->
<xsl:template name="sequenceNameString">
<xslaram name="sequenceName"/>
<xslaram name="maxCount"/>
<xslaram name="value"/>
<xslaram name="arrayMax" select="$maxCount - 1"/>
<xsl:if test="$value < $arrayMax">
<xsl:value-of
select="concat(concat($sequenceName,'_name'),$value)"/>
<xsl:call-template name="sequenceNameString">
<xsl:with-param name="value" select="$value + 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>