<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<xsl:output method="text" encoding="utf-8"/>
	<xsl:param name="mode"/>
	<xsl:variable name="xmode">getExtension</xsl:variable>

	<xsl:template match="opdracht">
	<xsl:variable name="pn"><xsl:value-of select="melding/kenmerk[@key='1583']"/></xsl:variable>
	<xsl:variable name="an"><xsl:value-of select="melding/kenmerk[@key='1621']"/></xsl:variable>
	<xsl:variable name="vn"><xsl:value-of select="melding/kenmerk[@key='1585']"/></xsl:variable>
	<xsl:variable name="rn"><xsl:value-of select="melding/kenmerk[@key='1586']"/></xsl:variable>
	<xsl:variable name="ap"><xsl:value-of select="melding/kenmerk[@key='1590']"/></xsl:variable>
	<xsl:variable name="po"><xsl:value-of select="melding/kenmerk[@key='1589']"/></xsl:variable>
	<xsl:variable name="pp"><xsl:value-of select="melding/kenmerk[@key='1591']"/></xsl:variable>
	<xsl:variable name="sw"><xsl:value-of select="melding/kenmerk[@key='1593']"/></xsl:variable>
	<xsl:variable name="ao"><xsl:value-of select="melding/kenmerk[@key='1594']"/></xsl:variable>
	<xsl:variable name="ea"><xsl:value-of select="melding/kenmerk[@key='1595']"/></xsl:variable>
	<xsl:variable name="be"><xsl:value-of select="melding/kenmerk[@key='1596']"/></xsl:variable>
	<xsl:variable name="ed"><xsl:value-of select="melding/kenmerk[@key='1598']"/></xsl:variable>
	<xsl:variable name="pf"><xsl:value-of select="melding/kenmerk[@key='1601']"/></xsl:variable>
	<xsl:variable name="tp"><xsl:value-of select="melding/kenmerk[@key='1600']"/></xsl:variable>
	<xsl:variable name="dn"><xsl:value-of select="concat(melding/discipline/srtdiscipline/prefix, melding/key)"/>/<xsl:value-of select=" bedrijfopdr_volgnr"/></xsl:variable>
	<xsl:value-of select="$pn"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$an"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$vn"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$rn"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$ap"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$po"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$pp"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$sw"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$ao"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$ea"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$be"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$ed"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$pf"/>
	<xsl:text>;</xsl:text><xsl:value-of select="$tp"/>
  <xsl:text>;</xsl:text><xsl:value-of select="$dn"/>
	</xsl:template>

	<!-- Maken 'bon' (XML) -->
	<xsl:template match="facilitor">
		<xsl:apply-templates select="opdracht"/>
	</xsl:template>

	<!-- Root -->
	<xsl:template match="/">
		<xsl:choose>
			<xsl:when test="$mode='getExtension'">
				<xsl:element name="format">
					<xsl:element name="extension"><![CDATA[<?xml version="1.0"?><format><extension>csv</extension></format>]]></xsl:element>
				</xsl:element>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates select="facilitor"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file:///a:/Facilitor/AAFM_A/TEMP/AAENopdracht31374.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->