Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Usage of Document function in xslt

TarakJun 10 2014 — edited Aug 12 2014

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(&quot;Maps.xml&quot;,&quot;mm:ValueMaps/mm:Map[@name='storeIdToOrganizationCode']/mm:Entry[@key=$storeId]/text()&quot;)"/>

"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.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2014
Added on Jun 10 2014
1 comment
1,100 views