Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


using variable in xpath(xsl:for-each)

From: pallavikamerkar@-----.---
To: NULL
Date: 9/13/2007 7:07:00 PM

Hi,
I am trying to use variable instead of a hard coded string in xsl:for-
each statement in xslt .

Please find the attached code which is working

<xsl:variable name="test2" select="FIXINC:FixedIncomeInstrument"/>
<xsl:for-each select="$test2">
       <testP1 type="String">
                <xsl:value-of select="test"/>
      </testP1>
</xsl:for-each>

However when I form test2 as follows then it stops working.It
says"Error in xpath expression"

<xsl:variable name="test1" select="'FixedIncomeInstrument'"/>
    <xsl:variable name="test" select="concat('FIXINC',':')"/>
    <xsl:variable name="test2" select="concat($test,$test1)"/>

<xsl:for-each select="$test2">
       <testP1 type="String">
                <xsl:value-of select="test"/>
      </testP1>
</xsl:for-each>

Does anyone know how to solve this issue?

Thanks,
Pallavi



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent