I want to get the value "a" in the node a under Root tag, within the output document(Input can be anything). I know that if I do
<xsl:value-of select="$item1"/>
I will get the desired value. However i want to use something like
<xsl:value-of select="concat('$item','1')"/>
The reason is because I can have many variables created, dynamically, and the number at the end of the variable gets incremented. So I can have item1,item2,item3 etc. I have shown a sample here, that is why I use hardcoded value , '1', in the value of select. Is this possible in xslt1.0?
Here is my xslt, any input xml can be used
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="item1" select="'a'" />
<Root>
<a>
<xsl:value-of select="concat('$item','1')"/>
</a>
</Root>
</xsl:template>
</xsl:stylesheet>