IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

How to use xslt variables inside the expression like select , test, count etc Options · View
jinoinfo
Posted: Wednesday, June 24, 2009 9:19:51 AM
Rank: Newbie

Joined: 6/23/2009
Posts: 2
Hi,

I am not able to use the xslt variable in the expression like select or count.

i have the following example,

<xsl:variable name="division" select="child::*/@name"/> // this is assigning the value suppose 'Glass'

<xsl:message><xsl:value-of select="$division"/> </xsl:message> // this is also printing Glass

<xsl:variable name="divisions" select="concat($division,'/Product')"/> // con catenating Glass/Product

<xsl:variable name="divisionsSub" select="concat($divisions,'/@value')"/> //concatenating Glass/Product/@value

<xsl:message><xsl:value-of select="$divisions"/> </xsl:message> // this is printing Glass/Product
<xsl:message><xsl:value-of select="divisionsSub"/> </xsl:message> //this is printing Glass/Product/@value






{html:'<xsl:value-of select="$divisionsSub"/>', url:'<xsl:value-of select="GLASS/Product/@url"/>', target:'navaction'}

]

when is use select="$divisionsSub", this is displaying Glass/Product/@value as it is instead of getting the value of the above.

My xml look like this
<Glass name="GLASS" value="GLASS"
url="AmatcpProdSelectionAction.cp?display=product&amp;amp;typeofproduct=offprod&amp;amp;prodSymId=610" sym_id="610">
<Product name="Product" rel_status="2" sym_id="24119" url="AmatcpProdSelectionAction.cp?display=product&amp;amp;typeofproduct=offprod&amp;amp;prodSymId=24119" value=" Oasis Clean">
</Product>
</Glass>

Please advice me.. on how i can use xsl variable inside the expressions like select and count

Thanks
Jino George
jinoinfo
Posted: Thursday, June 25, 2009 3:17:09 AM
Rank: Newbie

Joined: 6/23/2009
Posts: 2
Hi All,

It would be greate if somebody can guide me on the above issue of using xslt variable value in the expression like select, count etc..
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.