cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT coding help

Former Member
0 Kudos

Hi,

XSLT Code.

<?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:ns0="http://peoplesoft.com/APC_WORKER2_CI" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<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:Envelope/ soap:Body/ Create__CompIntfc__APC_WORKER2_CIResponse/ notification"/>
			</SUCCESS>

----pseudo code starts-------------

if SUCCESS eq 1,
then move "Y" to SUCCESS.
elseif SUCCESS eq 0,
then move "N" to SUCCESS

----pseudo code ends-------------

		</ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
	</xsl:template>
</xsl:stylesheet>

Could someone help to put the pseudo code in XSLT syntax.

Thanks,

-santosh

Edited by: santosh koraddi on Mar 24, 2011 1:23 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Below is the solution......

<?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:ns0="http://peoplesoft.com/APC_WORKER2_CI" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<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:choose>

<xsl:when test = "soap:Envelope/ soap:Body/ Create__CompIntfc__APC_WORKER2_CIResponse/ notification = 1">

<SUCCESS>Y</SUCCESS>

</xsl:when>

<xsl:when test = "soap:Envelope/ soap:Body/ Create__CompIntfc__APC_WORKER2_CIResponse/ notification = 0">

<SUCCESS>N</SUCCESS>

</xsl:when>

</xsl:choose>

</SUCCESS>

</ns1:Z_HPA_357_PROVISION_USER_IMS.Response>

</xsl:template>

</xsl:stylesheet>

Former Member
0 Kudos

w