MARX#51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking

svn path=/Website/branches/v2017.2/; revision=36942
This commit is contained in:
Marcel Bourseau
2018-02-12 16:31:46 +00:00
parent c4551fe3ab
commit 2b68982bc0
11 changed files with 248 additions and 2 deletions

View File

@@ -79,6 +79,12 @@
<!-- SIDB - Code van het land van het adres van de partij of lokatie. Optioneel, C(2) -->
<!-- <Country></Country> -->
</Contractor>
<xsl:call-template name="construct_attachment">
<xsl:with-param name="p_kenmerk_key" select="'20'"/>
<xsl:with-param name="p_node_naam" select="'TMP_Attachment'"/>
<xsl:with-param name="p_templatenodename" select="'ParseAttachment4The2ndTime'"/>
<xsl:with-param name="p_namespace" select="'http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005'"/>
</xsl:call-template>
<!-- SIDB - Niveau in het bericht waar de opdrachten worden gespecificeerd. Mandatory-->
<InstructionData>
<!-- SIDB - Nummer ter identificatie van een opdracht binnen een bericht. Mandatory, C(17)-->
@@ -281,6 +287,47 @@
<VATPercentage><xsl:value-of select="$p_taxperc"/></VATPercentage>
</VATInformation>
</xsl:template>
<xsl:template name="construct_attachment">
<xsl:param name="p_kenmerk_key"/>
<xsl:param name="p_node_naam"/>
<xsl:param name="p_templatenodename"/>
<xsl:param name="p_namespace"/>
<xsl:element name="FCLTopdrachtattachment">
<xsl:attribute name="opdrachtkey"><xsl:value-of select="key"/></xsl:attribute>
<xsl:attribute name="kenmerkkey"><xsl:value-of select="$p_kenmerk_key"/></xsl:attribute>
<xsl:attribute name="nodename"><xsl:value-of select="$p_node_naam"/></xsl:attribute>
<xsl:attribute name="encoding"><xsl:value-of select="'base64'"/></xsl:attribute>
<xsl:attribute name="templatenodename"><xsl:value-of select="$p_templatenodename"/></xsl:attribute>
</xsl:element>
</xsl:template>
<!-- Hier gebeurt het echte werk/styling voor naar buiten, omdat putorders deze template(XSL) voor de 2e keer aanroept -->
<xsl:template match="ParseAttachment4The2ndTime">
<ParseAttachment4The2ndTime>
<xsl:for-each select="TMP_Attachment">
<xsl:variable name="l_file_ext">
<xsl:call-template name="getFileExtension">
<xsl:with-param name="p_filename" select="name"/>
<xsl:with-param name="p_nesting_lvl" select="0"/>
</xsl:call-template>
</xsl:variable>
<Attachment xmlns="http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005">
<AttachedData><xsl:value-of select="attachment"/></AttachedData>
<DocumentType>OTA</DocumentType>
<FileType>
<xsl:choose>
<xsl:when test="$l_file_ext != ''"><xsl:value-of select="$l_file_ext"/></xsl:when>
<xsl:otherwise>---</xsl:otherwise>
</xsl:choose>
</FileType>
<FileName><xsl:value-of select="name"/></FileName>
</Attachment>
</xsl:for-each>
</ParseAttachment4The2ndTime>
</xsl:template>
<xsl:template match="SOAPEnvelope">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005">
@@ -383,6 +430,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -119,6 +119,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -122,6 +122,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -85,7 +85,7 @@
<xsl:template match="facilitor">
<xsl:apply-templates select="opdracht"/>
<xsl:apply-templates select="opdracht"/>
</xsl:template>
<xsl:template match="/">
@@ -95,9 +95,13 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>
<xsl:apply-templates select="facilitor"/>
<!-- door SendSOAP.cls gebruikt voor inpakken van 'bon' in SOAP envelope
SOAPEnvelope is een harde tag die in PutOrders gedefinieerd wordt. -->
<xsl:apply-templates select="SOAPEnvelope"/>

View File

@@ -97,6 +97,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -95,6 +95,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -97,6 +97,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -79,6 +79,12 @@
<!-- SIDB - Code van het land van het adres van de partij of lokatie. Optioneel, C(2) -->
<!-- <Country></Country> -->
</Contractor>
<xsl:call-template name="construct_attachment">
<xsl:with-param name="p_kenmerk_key" select="'20'"/>
<xsl:with-param name="p_node_naam" select="'TMP_Attachment'"/>
<xsl:with-param name="p_templatenodename" select="'ParseAttachment4The2ndTime'"/>
<xsl:with-param name="p_namespace" select="'http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005'"/>
</xsl:call-template>
<!-- SIDB - Niveau in het bericht waar de opdrachten worden gespecificeerd. Mandatory-->
<InstructionData>
<!-- SIDB - Nummer ter identificatie van een opdracht binnen een bericht. Mandatory, C(17)-->
@@ -281,6 +287,47 @@
<VATPercentage><xsl:value-of select="$p_taxperc"/></VATPercentage>
</VATInformation>
</xsl:template>
<xsl:template name="construct_attachment">
<xsl:param name="p_kenmerk_key"/>
<xsl:param name="p_node_naam"/>
<xsl:param name="p_templatenodename"/>
<xsl:param name="p_namespace"/>
<xsl:element name="FCLTopdrachtattachment">
<xsl:attribute name="opdrachtkey"><xsl:value-of select="key"/></xsl:attribute>
<xsl:attribute name="kenmerkkey"><xsl:value-of select="$p_kenmerk_key"/></xsl:attribute>
<xsl:attribute name="nodename"><xsl:value-of select="$p_node_naam"/></xsl:attribute>
<xsl:attribute name="encoding"><xsl:value-of select="'base64'"/></xsl:attribute>
<xsl:attribute name="templatenodename"><xsl:value-of select="$p_templatenodename"/></xsl:attribute>
</xsl:element>
</xsl:template>
<!-- Hier gebeurt het echte werk/styling voor naar buiten, omdat putorders deze template(XSL) voor de 2e keer aanroept -->
<xsl:template match="ParseAttachment4The2ndTime">
<ParseAttachment4The2ndTime>
<xsl:for-each select="TMP_Attachment">
<xsl:variable name="l_file_ext">
<xsl:call-template name="getFileExtension">
<xsl:with-param name="p_filename" select="name"/>
<xsl:with-param name="p_nesting_lvl" select="0"/>
</xsl:call-template>
</xsl:variable>
<Attachment xmlns="http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005">
<AttachedData><xsl:value-of select="attachment"/></AttachedData>
<DocumentType>OTA</DocumentType>
<FileType>
<xsl:choose>
<xsl:when test="$l_file_ext != ''"><xsl:value-of select="$l_file_ext"/></xsl:when>
<xsl:otherwise>---</xsl:otherwise>
</xsl:choose>
</FileType>
<FileName><xsl:value-of select="name"/></FileName>
</Attachment>
</xsl:for-each>
</ParseAttachment4The2ndTime>
</xsl:template>
<xsl:template match="SOAPEnvelope">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005">
@@ -386,6 +433,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -79,6 +79,12 @@
<!-- SIDB - Code van het land van het adres van de partij of lokatie. Optioneel, C(2) -->
<!-- <Country></Country> -->
</Contractor>
<xsl:call-template name="construct_attachment">
<xsl:with-param name="p_kenmerk_key" select="'20'"/>
<xsl:with-param name="p_node_naam" select="'TMP_Attachment'"/>
<xsl:with-param name="p_templatenodename" select="'ParseAttachment4The2ndTime'"/>
<xsl:with-param name="p_namespace" select="'http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005'"/>
</xsl:call-template>
<!-- SIDB - Niveau in het bericht waar de opdrachten worden gespecificeerd. Mandatory-->
<InstructionData>
<!-- SIDB - Nummer ter identificatie van een opdracht binnen een bericht. Mandatory, C(17)-->
@@ -282,6 +288,47 @@
</VATInformation>
</xsl:template>
<xsl:template name="construct_attachment">
<xsl:param name="p_kenmerk_key"/>
<xsl:param name="p_node_naam"/>
<xsl:param name="p_templatenodename"/>
<xsl:param name="p_namespace"/>
<xsl:element name="FCLTopdrachtattachment">
<xsl:attribute name="opdrachtkey"><xsl:value-of select="key"/></xsl:attribute>
<xsl:attribute name="kenmerkkey"><xsl:value-of select="$p_kenmerk_key"/></xsl:attribute>
<xsl:attribute name="nodename"><xsl:value-of select="$p_node_naam"/></xsl:attribute>
<xsl:attribute name="encoding"><xsl:value-of select="'base64'"/></xsl:attribute>
<xsl:attribute name="templatenodename"><xsl:value-of select="$p_templatenodename"/></xsl:attribute>
</xsl:element>
</xsl:template>
<!-- Hier gebeurt het echte werk/styling voor naar buiten, omdat putorders deze template(XSL) voor de 2e keer aanroept -->
<xsl:template match="ParseAttachment4The2ndTime">
<ParseAttachment4The2ndTime>
<xsl:for-each select="TMP_Attachment">
<xsl:variable name="l_file_ext">
<xsl:call-template name="getFileExtension">
<xsl:with-param name="p_filename" select="name"/>
<xsl:with-param name="p_nesting_lvl" select="0"/>
</xsl:call-template>
</xsl:variable>
<Attachment xmlns="http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005">
<AttachedData><xsl:value-of select="attachment"/></AttachedData>
<DocumentType>OTA</DocumentType>
<FileType>
<xsl:choose>
<xsl:when test="$l_file_ext != ''"><xsl:value-of select="$l_file_ext"/></xsl:when>
<xsl:otherwise>---</xsl:otherwise>
</xsl:choose>
</FileType>
<FileName><xsl:value-of select="name"/></FileName>
</Attachment>
</xsl:for-each>
</ParseAttachment4The2ndTime>
</xsl:template>
<xsl:template match="SOAPEnvelope">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005">
<soap:Header/>
@@ -330,6 +377,10 @@
<xsl:element name="extension">cxml</xsl:element>
</xsl:element>
</xsl:when>
<xsl:when test="$mode='processattachments'">
<!-- MARX51522: Uitbreiding REMS - Mareon: bijlage(foto's) in de opdrachtverstrekking -->
<xsl:apply-templates select="ParseAttachment4The2ndTime"/>
</xsl:when>
<xsl:otherwise>
<!-- door SendFile.cls gebruikt voor maken 'bon' (XML die via SOAP verstuurd wordt) -->
<xsl:apply-templates select="facilitor"/>

View File

@@ -70,6 +70,14 @@
<!-- SIDB - Code van het land van het adres van de partij of lokatie. Optioneel, C(2) -->
<!-- <Country></Country> -->
</Contractor>
<xsl:call-template name="construct_attachment">
<xsl:with-param name="p_kenmerk_key" select="'20'"/>
<xsl:with-param name="p_node_naam" select="'TMP_Attachment'"/>
<xsl:with-param name="p_templatenodename" select="'ParseAttachment4The2ndTime'"/>
<xsl:with-param name="p_namespace" select="'http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005'"/>
</xsl:call-template>
<!-- SIDB - Niveau in het bericht waar de opdrachten worden gespecificeerd. Mandatory-->
<InstructionData>
<!-- SIDB - Nummer ter identificatie van een opdracht binnen een bericht. Mandatory, C(17)-->
@@ -284,5 +292,47 @@
</VATInformation>
</xsl:template>
<xsl:template name="construct_attachment">
<xsl:param name="p_kenmerk_key"/>
<xsl:param name="p_node_naam"/>
<xsl:param name="p_templatenodename"/>
<xsl:param name="p_namespace"/>
<xsl:element name="FCLTopdrachtattachment">
<xsl:attribute name="opdrachtkey"><xsl:value-of select="key"/></xsl:attribute>
<xsl:attribute name="kenmerkkey"><xsl:value-of select="$p_kenmerk_key"/></xsl:attribute>
<xsl:attribute name="nodename"><xsl:value-of select="$p_node_naam"/></xsl:attribute>
<xsl:attribute name="encoding"><xsl:value-of select="'base64'"/></xsl:attribute>
<xsl:attribute name="templatenodename"><xsl:value-of select="$p_templatenodename"/></xsl:attribute>
</xsl:element>
</xsl:template>
<!-- Hier gebeurt het echte werk/styling voor naar buiten, omdat putorders deze template(XSL) voor de 2e keer aanroept -->
<xsl:template match="ParseAttachment4The2ndTime">
<ParseAttachment4The2ndTime>
<xsl:for-each select="TMP_Attachment">
<xsl:variable name="l_file_ext">
<xsl:call-template name="getFileExtension">
<xsl:with-param name="p_filename" select="name"/>
<xsl:with-param name="p_nesting_lvl" select="0"/>
</xsl:call-template>
</xsl:variable>
<Attachment xmlns="http://www.ketenstandaard.nl/onderhoudsopdracht/SALES/005">
<AttachedData><xsl:value-of select="attachment"/></AttachedData>
<DocumentType>OTA</DocumentType>
<FileType>
<xsl:choose>
<xsl:when test="$l_file_ext != ''"><xsl:value-of select="$l_file_ext"/></xsl:when>
<xsl:otherwise>---</xsl:otherwise>
</xsl:choose>
</FileType>
<FileName><xsl:value-of select="name"/></FileName>
</Attachment>
</xsl:for-each>
</ParseAttachment4The2ndTime>
</xsl:template>
</xsl:stylesheet>

View File

@@ -90,6 +90,25 @@
</xsl:if>
</xsl:template>
<xsl:template name="getFileExtension">
<xsl:param name="p_filename"/>
<xsl:param name="p_nesting_lvl"/>
<xsl:choose>
<xsl:when test="contains($p_filename, '.')">
<xsl:call-template name="getFileExtension">
<xsl:with-param name="p_filename" select="substring-after($p_filename, '.')"/>
<xsl:with-param name="p_nesting_lvl" select="$p_nesting_lvl + 1"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$p_nesting_lvl = 0"></xsl:when> <!-- Filenaam heeft helemaal geen extensie -->
<xsl:otherwise><xsl:value-of select="$p_filename"/></xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Parse XML-String to XML-object -->
<xsl:template name="parseXml">
<xsl:param name="text"/>