STCH#51457 -- Strukton import xsl
svn path=/Website/branches/v2017.2/; revision=36496
This commit is contained in:
53
CUST/STCH/import/Strukton/strukton.xsl
Normal file
53
CUST/STCH/import/Strukton/strukton.xsl
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="text"/>
|
||||
|
||||
<xsl:decimal-format name="european" decimal-separator="," grouping-separator="."/>
|
||||
|
||||
<xsl:template name="escape_quote">
|
||||
<xsl:param name="string"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($string, '"')">
|
||||
<xsl:value-of select="substring-before($string, '"')"/>""<xsl:call-template name="escape_quote">
|
||||
<xsl:with-param name="string" select="substring-after($string, '"')"/></xsl:call-template></xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$string"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="linebreaks">
|
||||
<xsl:param name="string"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($string, '
')">
|
||||
<xsl:value-of select="substring-before($string, '
')"/>@@<xsl:call-template name="linebreaks">
|
||||
<xsl:with-param name="string" select="substring-after($string, '
')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$string"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">referenceID;ServiceRequestID;TypeID;DateTime;Description;Remarks;Total
|
||||
<xsl:for-each select="//Status">
|
||||
<xsl:variable name="costinfo"><xsl:if test="TypeID = '40'">@@Bruto: <20> <xsl:value-of select="format-number(CostCalculation/Total - CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Clausule: <20> <xsl:value-of select="format-number(CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Totaal: <20> <xsl:value-of select="format-number(CostCalculation/Total, '0,00', 'european')"/></xsl:if></xsl:variable>
|
||||
<xsl:variable name="costs"><xsl:if test="TypeID = '40'"><xsl:value-of select="CostCalculation/Total"/></xsl:if></xsl:variable>
|
||||
<xsl:variable name="remarks_unquote"><xsl:call-template name="escape_quote"><xsl:with-param name="string" select="substring(Remarks,1,800)"/></xsl:call-template></xsl:variable>
|
||||
<xsl:variable name="remarks_uncr">"<xsl:call-template name="linebreaks"><xsl:with-param name="string" select="$remarks_unquote"/></xsl:call-template><xsl:value-of select="$costinfo"/>"</xsl:variable>
|
||||
<xsl:variable name="new_line" select="'
'"/>
|
||||
<xsl:variable name="referenceID"><xsl:value-of select="ReferenceID"/></xsl:variable>
|
||||
<xsl:variable name="serviceRequestID"><xsl:value-of select="ServiceRequestID"/></xsl:variable>
|
||||
<xsl:variable name="typeID"><xsl:value-of select="TypeID"/></xsl:variable>
|
||||
<xsl:variable name="dateTime"><xsl:value-of select="DateTime"/></xsl:variable>
|
||||
<xsl:variable name="description"><xsl:value-of select="Description"/></xsl:variable>
|
||||
<xsl:value-of select="$referenceID"/>;<xsl:value-of select="$serviceRequestID"/>;<xsl:value-of select="$typeID"/>;<xsl:value-of select="$dateTime"/>;<xsl:value-of select="$description"/>;<xsl:value-of select="$remarks_uncr"/>;<xsl:value-of select="$costs"/><xsl:value-of select="$new_line"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
<!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. -->
|
||||
Reference in New Issue
Block a user