<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:web="http://www.webwinkel.nl" exclude-result-prefixes="web">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

	<xsl:template match="/">

		<order xmlns="http://www.groothandel.nl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.groothandel.nl file:///H:/XMLbestanden/Groothandel.xsd">

			<contactpersoon>Piet Paulusma</contactpersoon>
			<xsl:for-each select="/web:bestelling/web:product">
				<product>
					<productid>
						<xsl:choose>
							<xsl:when test="web:productid='B-431'">ws-434</xsl:when>
							<xsl:when test="web:productid='B-432'">th-111</xsl:when>
							<xsl:when test="web:productid='B-433'">rg-212</xsl:when>
							<xsl:when test="web:productid='B-434'">wm-212</xsl:when>
							<xsl:otherwise>??-???</xsl:otherwise>
						</xsl:choose>
					</productid>
					<aantal>
						<xsl:value-of select="./web:aantal"/>
					</aantal>
				
				</product>
			</xsl:for-each>
			<datum>
				<xsl:value-of select="concat(//web:jaar,'-',//web:maand,'-',//web:dag)"/>
			</datum>
			<klantid>23451</klantid>
		</order>

	</xsl:template>
</xsl:stylesheet>