Skip to content

Instantly share code, notes, and snippets.

@greystate
Created December 16, 2015 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greystate/cd9793ca67fed65a2eb7 to your computer and use it in GitHub Desktop.
Save greystate/cd9793ca67fed65a2eb7 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://soap.sforce.com/schemas/class/test"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:partner.soap.sforce.com"
>
<xsl:template match="/">
<soapenv:Envelope>
<soapenv:Header>
<urn:SessionHeader>
<urn:sessionId>
<!-- Pick the Session ID -->
<xsl:value-of select="ns0:Submit_Input/ns0:ListOfInboundResponse/ns0:TransactionHeader/ns0:SID"/>
</urn:sessionId>
</urn:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<!-- Use identity template(s) for copying -->
<xsl:apply-templates select="ns0:Submit_Input" mode="copy" />
</soapenv:Body>
</soapenv:Envelope>
</xsl:template>
<!-- Identity transform -->
<xsl:template match="* | text()" mode="copy">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates select="* | text()" mode="copy" />
</xsl:copy>
</xsl:template>
<!-- Specific "copy" template for SID element -->
<xsl:template match="ns0:SID" mode="copy">
<!-- Don't copy this specific element -->
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment