cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping

Former Member
0 Kudos

I have worked with XSLT in the past, but never within Process Integration. I have the below xml and am attempting to grab the conversationId out of the xml for my mapping. But due to the namespace, ns0:, I am having trouble getting this value. In my prior work with XSLT, I never worked with namespaces. Any help would be greatly appreciated.

XML

<?xml version="1.0" encoding="UTF-8"?>

<ns0:processInboundMessage xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterface/">

<choreographyId/>

<businessPartnerId/>

<actionId/>

<conversationId>123456</conversationId>

<messageId/>

<payload>

</ns0:processInboundMessage>

value-of select

<xsl:value-of select="ns0:processInboundMessage/ns0:conversationId"/>

I've tried with the namespace, without, still can't retrieve the value. Unfortunately, I have to have the namespace in there.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi,

For this input XML


<?xml version="1.0" encoding="UTF-8"?>
<ns0:processInboundMessage xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterfaces">
<choreographyId/>
<businessPartnerId/>
<actionId/>
<conversationId>123456</conversationId>
<messageId/>
<payload/>
</ns0:processInboundMessage>

I wrote this XSLT code


<?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterfaces">
<xsl:template match="/">
<ns0:processInboundMessage>
	
    <SrcFile><xsl:value-of select="ns0:processInboundMessage/conversationId"></xsl:value-of></SrcFile>
	
</ns0:processInboundMessage>	
</xsl:template>
</xsl:stylesheet>

The output XML obtained is as shown below


<?xml version="1.0" encoding="UTF-8"?>
<ns0:processInboundMessage xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterfaces">
<SrcFile>123456</SrcFile>
</ns0:processInboundMessage>

Hope this solves your problem.

Regards

Anupam

Former Member
0 Kudos

Thanks. I actually came to the same conclusion.

Answers (0)