MARX#38875: Ondersteunen van namespace varianten in statusopdracht
svn path=/Website/branches/v2016.2/; revision=32195
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" version="1.0">
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
xmlns:sales005="http://www.ketenstandaard.nl/onderhoudstatus/SALES/005" version="1.0">
|
||||
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
|
||||
<xsl:decimal-format name="european" decimal-separator="." grouping-separator=","/>
|
||||
<xsl:param name="mode"/>
|
||||
@@ -71,6 +72,24 @@
|
||||
</facilitor>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sales005:MaintenanceStatus">
|
||||
<facilitor>
|
||||
<xsl:element name="opdracht">
|
||||
<xsl:attribute name="key"><xsl:value-of select="translate(sales005:InstructionData/sales005:InstructionNumber, 'MAR', '')"/></xsl:attribute>
|
||||
<xsl:attribute name="type">update</xsl:attribute>
|
||||
<status><xsl:apply-templates select="sales005:InstructionData/sales005:Status"/></status>
|
||||
<!-- Plandatum en tijd van opdracht -->
|
||||
<!-- In INSBOU001 Release nov-2015 hiervoor node AppointmentDateTimeInformation gebruiken, daarvoor node CompletionDateTimeInformation -->
|
||||
<plandatum><xsl:value-of select="sales005:InstructionData/sales005:AppointmentDateTimeInformation/sales005:RequiredDeliveryDate"/><xsl:text> </xsl:text><xsl:value-of select="sales005:InstructionData/sales005:AppointmentDateTimeInformation/sales005:RequiredDeliveryTime"/></plandatum>
|
||||
<!-- Afwijkende gereeddatum (<> SYSDATE) kan via mut_datum, de werking is wel afhankelijk van -->
|
||||
<xsl:if test="sales005:InstructionData/sales005:Status = 'GER'">
|
||||
<mut_datum><xsl:apply-templates select="sales005:InstructionData/sales005:DateReady"/></mut_datum>
|
||||
</xsl:if>
|
||||
<opmerking><xsl:apply-templates select="sales005:InstructionData/sales005:StatusDescription"/></opmerking>
|
||||
</xsl:element>
|
||||
</facilitor>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Status">
|
||||
<!-- In SidB zijn de volgende statussen mogelijk: -->
|
||||
<!-- CODE OMSCHRIJVING -->
|
||||
@@ -88,6 +107,23 @@
|
||||
<!-- FSN#31934: Mareon kan niet goed overweg als ACC vaker dan 1x wordt gestuurd, NB: ACC is geen (optionele) expliciete statuscode voor accepteren door de leverancier. -->
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<xsl:template match="sales005:Status">
|
||||
<!-- In SidB zijn de volgende statussen mogelijk: -->
|
||||
<!-- CODE OMSCHRIJVING -->
|
||||
<!-- AFM Afwachten, mail gestuurd -->
|
||||
<!-- AFR Afwachten, reactie opzichter -->
|
||||
<!-- AFW Afwachten in verband met weer -->
|
||||
<!-- ANN Opdracht geannuleerd -->
|
||||
<!-- BBT Bewoner belt terug -->
|
||||
<!-- GER Gereedmelding -->
|
||||
<!-- VER Verlenging -->
|
||||
<xsl:choose>
|
||||
<xsl:when test=".='GER'">ORDAFM</xsl:when>
|
||||
<xsl:when test=".='ANN'">ORDCAN</xsl:when>
|
||||
<xsl:when test=".='ACC'">ORDACP</xsl:when>
|
||||
<!-- FSN#31934: Mareon kan niet goed overweg als ACC vaker dan 1x wordt gestuurd, NB: ACC is geen (optionele) expliciete statuscode voor accepteren door de leverancier. -->
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="StatusDescription">
|
||||
<xsl:value-of select="."/>
|
||||
@@ -96,6 +132,13 @@
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="sales005:StatusDescription">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:for-each select="../sales005:FreeText">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="DateReady">
|
||||
<!-- Formaat DateReady is niet eenduidig volgens SidB specs, kan zijn CCYYMMDD of YYYY-MM-DD -->
|
||||
@@ -105,7 +148,14 @@
|
||||
<xsl:variable name="l_afmeld_datum" select="translate(.,'-','')"/>
|
||||
<xsl:value-of select="substring($l_afmeld_datum,1,4)"/>-<xsl:value-of select="substring($l_afmeld_datum,5,2)"/>-<xsl:value-of select="substring($l_afmeld_datum,7,2)"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sales005:DateReady">
|
||||
<!-- Formaat DateReady is niet eenduidig volgens SidB specs, kan zijn CCYYMMDD of YYYY-MM-DD -->
|
||||
<!-- Vanwege deze onduidelijkheid gewoon maar beide formaten ondersteunen ... -->
|
||||
<!-- ... door eerst eventuele streepjes - te verwijderen, daarna gewoon weer toevoegen, dan is het formaat altijd YYYY-MM-DD -->
|
||||
<!-- Eerst streepjes weg, dus altijd formaat YYYYMMDD -->
|
||||
<xsl:variable name="l_afmeld_datum" select="translate(.,'-','')"/>
|
||||
<xsl:value-of select="substring($l_afmeld_datum,1,4)"/>-<xsl:value-of select="substring($l_afmeld_datum,5,2)"/>-<xsl:value-of select="substring($l_afmeld_datum,7,2)"/>
|
||||
</xsl:template>
|
||||
<!--xsl:template match="soap:Body">
|
||||
<xsl:apply-templates select="facilitor"/>
|
||||
</xsl:template>
|
||||
@@ -124,7 +174,7 @@
|
||||
<xsl:apply-templates select="facilitor"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="substring-before(name(),concat(':', local-name()))='' and local-name()='MaintenanceStatus'">
|
||||
<xsl:apply-templates select="MaintenanceStatus"/>
|
||||
<xsl:apply-templates select="sales005:MaintenanceStatus"/>
|
||||
</xsl:when>
|
||||
<!--xsl:when test="local-name()='Envelope'">
|
||||
<xsl:apply-templates select="soap:Envelope"/>
|
||||
|
||||
Reference in New Issue
Block a user