<?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" version="1.0" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
	<xsl:output method="xml" indent="yes" encoding="utf-8"/>
	<xsl:decimal-format name="european" decimal-separator="." grouping-separator=","/>
	<xsl:param name="mode"/>
	<xsl:variable name="Rev">
		<!-- Revision van deze cust.xsl -->
		<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
	</xsl:variable>

	<xsl:template match="reservering">
		<!-- ******************************************************************* -->
		<!-- *****Response naar Smart Signs nav. insert/update/delete            -->
		<!-- ******************************************************************* -->
		<facilitorresponse xmlns:fclt="http://facilitor.nl/reserveringen">
			<xsl:element name="fclt:reservering">
				<xsl:attribute name="key">
					<xsl:value-of select="resid"/>
				</xsl:attribute>
				<xsl:attribute name="type">response</xsl:attribute>
				<returncode>
					<xsl:value-of select="returncode"/>
				</returncode>
				<returntekst>
					<xsl:value-of select="returntekst"/>
				</returntekst>
				<datum>
					<xsl:value-of select="datum"/>
				</datum>
				<resid>
					<xsl:value-of select="resid"/>
				</resid>
			</xsl:element>
		</facilitorresponse>
	</xsl:template>

	<xsl:template match="facilitor">
		<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
			<SOAP-ENV:Body>
				<xsl:apply-templates select="reservering"/>
			</SOAP-ENV:Body>
		</SOAP-ENV:Envelope>
	</xsl:template>

	<!-- Root -->
	<xsl:template match="*">

		
		<xsl:choose>
			<!-- Zonder prefix, dan response -> toevoegen envelop, namespace + prefix! -->
			<xsl:when test="substring-before(name(),concat(':', local-name()))=''">
				<xsl:if test="local-name()='facilitor'">
					<xsl:apply-templates select="facilitor"/>
				</xsl:if>
			</xsl:when>
			<!-- Met prefix, dan insert/update/delete ontvangen -> verwijderen prefix! -->
			<xsl:otherwise>
				<!-- remove element prefix -->
				<xsl:copy-of select="soap:Body/facilitor/reservering"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. -->