<?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, '&quot;')">
				<xsl:value-of select="substring-before($string, '&quot;')"/>&quot;&quot;<xsl:call-template name="escape_quote">
					<xsl:with-param name="string" select="substring-after($string, '&quot;')"/></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, '&#xA;')">
				<xsl:value-of select="substring-before($string, '&#xA;')"/>@@<xsl:call-template name="linebreaks">
					<xsl:with-param name="string" select="substring-after($string, '&#xA;')"/>
				</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: € <xsl:value-of select="format-number(CostCalculation/Total - CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Clausule: € <xsl:value-of select="format-number(CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Totaal: € <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">&quot;<xsl:call-template name="linebreaks"><xsl:with-param name="string" select="$remarks_unquote"/></xsl:call-template><xsl:value-of select="$costinfo"/>&quot;</xsl:variable>
<xsl:variable name="new_line" select="'&#xA;'"/>
<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. -->