<?xml version="1.0" encoding="UTF-8"?>
<!--
This file was generated by Altova MapForce 2013sp1

YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.

Refer to the Altova MapForce Documentation for further details.
http://www.altova.com/mapforce
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vmf="http://www.altova.com/MapForce/UDF/vmf" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="vmf xs">
	<xsl:template name="vmf:vmf1_Inputtoresult">
		<xsl:param name="input" select="/.."/>
		<xsl:choose>
			<xsl:when test="$input='Stück'">
				<xsl:value-of select="'Stk'"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="''"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="vmf:vmf2_Inputtoresult">
		<xsl:param name="input" select="/.."/>
		<xsl:choose>
			<xsl:when test="$input='Wahr'">
				<xsl:value-of select="'6'"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="'0'"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="vmf:vmf3_Inputtoresult">
		<xsl:param name="input" select="/.."/>
		<xsl:choose>
			<xsl:when test="$input='Wahr'">
				<xsl:value-of select="'1'"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="'0'"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="vmf:vmf4_Inputtoresult">
		<xsl:param name="input" select="/.."/>
		<xsl:choose>
			<xsl:when test="$input='Wahr'">
				<xsl:value-of select="'EUR'"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="''"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<mlxmldata>
			<crm_article>
				<xsl:attribute name="showparams">
					<xsl:value-of select="string(floor('0'))"/>
				</xsl:attribute>
				<xsl:for-each select="GSEXPORTDATA">
					<xsl:attribute name="count">
						<xsl:value-of select="string(count(DATASET/RECORD))"/>
					</xsl:attribute>
				</xsl:for-each>
				<xsl:for-each select="GSEXPORTDATA/DATASET/RECORD">
					<xsl:variable name="var1_resultof_cast" select="string(EINHEIT)"/>
					<xsl:variable name="var2_resultof_vmf__Inputtoresult">
						<xsl:call-template name="vmf:vmf1_Inputtoresult">
							<xsl:with-param name="input" select="$var1_resultof_cast"/>
						</xsl:call-template>
					</xsl:variable>
					<xsl:variable name="var3_resultof_vmf__Inputtoresult">
						<xsl:call-template name="vmf:vmf4_Inputtoresult">
							<xsl:with-param name="input" select="string(EURO)"/>
						</xsl:call-template>
					</xsl:variable>
					<crm_article_item>
						<xsl:attribute name="weight">
							<xsl:value-of select="/.."/>
						</xsl:attribute>
						<xsl:attribute name="unitid">
							<xsl:choose>
								<xsl:when test="string((string-length(string($var2_resultof_vmf__Inputtoresult)) &gt; '0')) != 'false'">
									<xsl:value-of select="string($var2_resultof_vmf__Inputtoresult)"/>
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="$var1_resultof_cast"/>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:attribute>
						<xsl:attribute name="title">
							<xsl:value-of select="string(MATCH)"/>
						</xsl:attribute>
						<xsl:attribute name="groupid">
							<xsl:value-of select="string(SHOPTYPE)"/>
						</xsl:attribute>
						<xsl:attribute name="ean">
							<xsl:value-of select="/.."/>
						</xsl:attribute>
						<xsl:attribute name="branchid">
							<xsl:value-of select="string(WG)"/>
						</xsl:attribute>
						<xsl:attribute name="baseprice2">
							<xsl:value-of select="string(number(translate(string(floor(number(string(EKPR02)))), ',', '.')))"/>
						</xsl:attribute>
						<xsl:attribute name="baseprice">
							<xsl:value-of select="string(number(translate(string(EKPR01), ',', '.')))"/>
						</xsl:attribute>
						<xsl:variable name="var4_resultof_vmf__Inputtoresult">
							<xsl:call-template name="vmf:vmf2_Inputtoresult">
								<xsl:with-param name="input" select="string(LAGART)"/>
							</xsl:call-template>
						</xsl:variable>
						<xsl:attribute name="articletype">
							<xsl:value-of select="string($var4_resultof_vmf__Inputtoresult)"/>
						</xsl:attribute>
						<xsl:attribute name="articlenr">
							<xsl:value-of select="string(ARTNR)"/>
						</xsl:attribute>
						<xsl:attribute name="articleexternalurl">
							<xsl:value-of select="/.."/>
						</xsl:attribute>
						<xsl:attribute name="issecondhand">
							<xsl:call-template name="vmf:vmf3_Inputtoresult">
								<xsl:with-param name="input" select="string(ALTTEIL)"/>
							</xsl:call-template>
						</xsl:attribute>
						<xsl:attribute name="warrantymonths">
							<xsl:value-of select="string(GARANTIEMONATE)"/>
						</xsl:attribute>
						<descr>
							<xsl:attribute name="mlxmldataencoding">None</xsl:attribute>
						</descr>
						<shortdescr>
							<xsl:attribute name="mlxmldataencoding">None</xsl:attribute>
							<xsl:value-of select="string(ZUSTEXT1)"/>
						</shortdescr>
						<crm_articleprice>
							<crm_articleprice_item>
								<xsl:attribute name="pricetypeid">Verkaufspreis 1</xsl:attribute>
								<xsl:attribute name="price">
									<xsl:value-of select="string(number(translate(string(VKPREIS1), ',', '.')))"/>
								</xsl:attribute>
								<xsl:attribute name="curid">
									<xsl:value-of select="string($var3_resultof_vmf__Inputtoresult)"/>
								</xsl:attribute>
							</crm_articleprice_item>
							<crm_articleprice_item>
								<xsl:attribute name="pricetypeid">Verkaufspreis 2</xsl:attribute>
								<xsl:attribute name="price">
									<xsl:value-of select="string(number(translate(string(VKPREIS2), ',', '.')))"/>
								</xsl:attribute>
								<xsl:attribute name="curid">
									<xsl:value-of select="string($var3_resultof_vmf__Inputtoresult)"/>
								</xsl:attribute>
							</crm_articleprice_item>
							<crm_articleprice_item>
								<xsl:attribute name="pricetypeid">Verkaufspreis 3</xsl:attribute>
								<xsl:attribute name="price">
									<xsl:value-of select="string(number(translate(string(VKPREIS3), ',', '.')))"/>
								</xsl:attribute>
								<xsl:attribute name="curid">
									<xsl:value-of select="string($var3_resultof_vmf__Inputtoresult)"/>
								</xsl:attribute>
							</crm_articleprice_item>
							<crm_articleprice_item>
								<xsl:attribute name="pricetypeid">Verkaufspreis 4</xsl:attribute>
								<xsl:attribute name="price">
									<xsl:value-of select="string(number(translate(string(VKPREIS4), ',', '.')))"/>
								</xsl:attribute>
								<xsl:attribute name="curid">
									<xsl:value-of select="string($var3_resultof_vmf__Inputtoresult)"/>
								</xsl:attribute>
							</crm_articleprice_item>
							<crm_articleprice_item>
								<xsl:attribute name="pricetypeid">Verkaufspreis 5</xsl:attribute>
								<xsl:attribute name="price">
									<xsl:value-of select="string(number(translate(string(VKPREIS5), ',', '.')))"/>
								</xsl:attribute>
								<xsl:attribute name="curid">
									<xsl:value-of select="string($var3_resultof_vmf__Inputtoresult)"/>
								</xsl:attribute>
							</crm_articleprice_item>
						</crm_articleprice>
					</crm_article_item>
				</xsl:for-each>
			</crm_article>
		</mlxmldata>
	</xsl:template>
</xsl:stylesheet>
