Hello All,
I want to lookup xml file and retrieve the value based on key in xslt. .
Below is the xml file
<?xml version="1.0" encoding="UTF-8"?>
<mm:ValueMaps
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mm="http://WCToSSFSMediationModule"
>
<mm:Map name="storeIdToOrganizationCode">
<mm:Entry key="19658">001GB</mm:Entry>
<mm:Entry key="11306">001CA</mm:Entry>
</mm:Map>
</mm:ValueMaps>
Below the xpath i have used in document function in xslt and but my bad its not working. Could some please help me in figuring it out pls
<xsl:variable name="actualOrganizationCode"
select="document("Maps.xml","mm:ValueMaps/mm:Map[@name='storeIdToOrganizationCode']/mm:Entry[@key=$storeId]/text()")"/>
"storeId" is a variable that hold value in xslt which i am using in document function.
FYI Maps.xml is located under same directory of xslt.
Regards,
Tarak.