<?xml version="1.0"?>
<!--
@author Last Changed:$Author: theegarten $
@version $Revision: 4772 $
@date $Date: 2010-09-06 15:04:22 +0200 (Mo, 06 Sep 2010) $
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://schema.infor.com/InforOAGIS/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<!---->
	<!-- imports -->
	<!---->
	<!-- template to insert -->
	<xsl:template name="Quantity">
		<!---->
		<!-- parameter -->
		<xsl:param name="name"/>
		<xsl:param name="unitCode"/>
		<xsl:param name="quantity"/>
		<!---->
		<!-- set Quantity - quantity can't be empty -->
		<xsl:variable name="quantityInt">
			<xsl:choose>
				<xsl:when test="$quantity!=''">
					<xsl:value-of select="$quantity"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="'0'"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<!---->
		<xsl:element name="{$name}">
			<xsl:attribute name="unitCode"><xsl:value-of select="$unitCode"/></xsl:attribute>
			<xsl:value-of select="$quantityInt"/>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet>
