DIAN#51429 EXACT-export
svn path=/Website/branches/v2018.1/; revision=39600
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
</soap:Envelope>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Maken 'bon' (XML) -->
|
||||
<!-- Maken 'bon' per SOAP verstuurd -->
|
||||
<xsl:template match="facilitor">
|
||||
<xsl:apply-templates select="bestelopdracht"/>
|
||||
</xsl:template>
|
||||
@@ -52,37 +52,67 @@
|
||||
</soap:Envelope-->
|
||||
</xsl:template>
|
||||
|
||||
<!-- Uitpakken SOAP envelope -->
|
||||
<!-- Uitpakken response uit SOAP envelope -->
|
||||
<xsl:template match="soap:Envelope">
|
||||
<soapResult>
|
||||
<xsl:copy-of select="soap:Body/node()"/>
|
||||
<!-- Remove element prefix -->
|
||||
<xsl:element name="{local-name()}">
|
||||
<!-- Process attributes -->
|
||||
<xsl:for-each select="@*">
|
||||
<!-- Remove attribute prefix -->
|
||||
<xsl:attribute name="{local-name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</soapResult>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Decoderen XML response -->
|
||||
<xsl:template match="cXML">
|
||||
<!-- Lezen status uit gefaalde response -->
|
||||
<xsl:template match="soapResult">
|
||||
<Result>
|
||||
<xsl:if test="substring(Response/@code, 1)!='2'"><xsl:value-of select="Response/@text"/></xsl:if>
|
||||
<xsl:if test="//PostOrderResult!='ALL_OK'"><xsl:value-of select="//PostOrderResult"/></xsl:if>
|
||||
</Result>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Root -->
|
||||
<xsl:template match="/">
|
||||
<xsl:template match="*">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mode='getExtension'">
|
||||
<xsl:element name="format">
|
||||
<xsl:element name="extension">xml</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
|
||||
<!-- Uitgaand: facilitor-node -->
|
||||
<xsl:when test="local-name()='facilitor'">
|
||||
<!-- Door SendFile.cls gebruikt voor maken 'bon' per SOAP verstuurd -->
|
||||
<xsl:apply-templates select="facilitor"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor inpakken van 'bon' in SOAP envelope -->
|
||||
<!-- Door SendSOAP.cls gebruikt voor inpakken 'bon' in SOAP envelope -->
|
||||
<xsl:apply-templates select="SOAPEnvelope"/>
|
||||
<!-- door SendSOAP.cls gebruikt voor uitpakken van response uit SOAP envelope -->
|
||||
</xsl:when>
|
||||
<!-- Inkomend: soap:Envelope-node -->
|
||||
<!-- Door SendSOAP.cls gebruikt voor uitpakken response uit SOAP envelope -->
|
||||
<!--*DOET HELEMAAL NIETS* xsl:when test="local-name()='soap:Envelope'">
|
||||
<xsl:apply-templates select="soap:Envelope"/>
|
||||
<!-- door SendFile.cls gebruikt voor lezen van status uit gefaalde response (NB: <soapResult> is al door de decode gestript) -->
|
||||
<xsl:apply-templates select="soapResult/cXML"/>
|
||||
</xsl:when-->
|
||||
<!-- Inkomend: soapResult-node -->
|
||||
<!-- Door SendFile.cls gebruikt voor lezen status uit gefaalde response -->
|
||||
<!--*DOET HELEMAAL NIETS* xsl:when test="local-name()='soapResult'">
|
||||
<xsl:apply-templates select="soapResult"/>
|
||||
</xsl:when-->
|
||||
<xsl:otherwise>
|
||||
<!-- Remove element prefix -->
|
||||
<xsl:element name="{local-name()}">
|
||||
<!-- Process attributes -->
|
||||
<xsl:for-each select="@*">
|
||||
<!-- Remove attribute prefix -->
|
||||
<xsl:attribute name="{local-name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
Reference in New Issue
Block a user