on 03-22-2011 11:12 PM
Hi,
Source XML.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Create__CompIntfc__APC_WORKER2_CIResponse xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI">
<ns0:notification>y</ns0:notification>
<ns0:detail>
<ns0:keyinformation>
<ns0:PERSON_ID/>
<ns0:SUBMIT_DATE/>
<ns0:ACTION/>
</ns0:keyinformation>
<ns0:messages>
<ns0:type/>
<ns0:messagesetnumber/>
<ns0:messagenumber/>
<ns0:messagetext/>
<ns0:explaintext/>
</ns0:messages>
</ns0:detail>
</ns0:Create__CompIntfc__APC_WORKER2_CIResponse>
Target XML
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions"><SUCCESS>y</SUCCESS></ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
XSLT Mapping
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns1="http://authserv.apc.com/peoplesoft">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
<SUCCESS>
<xsl:value-of select="soap:Create__CompIntfc__APC_WORKER2_CIResponse/a:notification" />
</SUCCESS>
</ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
</xsl:template>
</xsl:stylesheet>
Can somebody help to figure out the issue in higlighted area of XSLT mapping.
We just need to move "notification" value to "SUCCESS" value of RFC.
thanks.
santosh,.
Hi Santosh,
add the source namespace with a prefix:
xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI"
do it most simple generic without path
//
do not forget the prefix
ns0:
use xsl:value-of:
xsl:value-of select="//ns0:notification"
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this ...
<xsl:value-of select="ns0:Create__CompIntfc__APC_WORKER2_CIResponse/ns0:notification" />
or
<xsl:value-of select="ns0:Create__CompIntfc__APC_WORKER2_CIResponse/notification" />
Hope that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.