My code was unable to return a value from the input XML. The variable name is mapped in a separate xml based on a string.
Step 1: I need to extract the XML tag from the another mapping XML. (This I got it)
Step 2: XML tag is saved in a variable and using the root tag, I am not able to get the value
This is the XSLT:
<xsl:template match="SUBSCRIBER">
<xsl:variable name="expiry_date" select="$docStringAccountMapping/STRING_ACCOUNTS_LIST/STRING_ACCOUNTS_INFO[NSN_STRING='ThirdAccount']/AEXPIRY_DATE"/>
<!-- this returns a string "EXPIRY_DATE_1" -->
<xsl:value-of select="SUBSCRIBER/$expiry_date"/>
</xsl:template>
This is the XML:
<SUBSCRIBER>
<EXPIRY_DATE_1>2014-07-09 23:59:59</EXPIRY_DATE_1>
</SUBSCRIBER>