<?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="Note">
		<!---->
		<!-- parameter -->
		<xsl:param name="note"/>
		<xsl:param name="language"/>
		<xsl:param name="type"/>
		<xsl:param name="use"/>
		<xsl:param name="author"/>
		<xsl:param name="dateTime"/>
		<xsl:param name="status"/>
		<!---->
		<!-- set Type -->
		<xsl:variable name="typeInt">
			<xsl:choose>
				<xsl:when test="$type != ''">
					<xsl:value-of select="$type"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="'Text'"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<!---->
		<xsl:if test="$note != ''">
			<xsl:element name="Note">
				<xsl:if test="$language != ''">
					<xsl:attribute name="languageID"><xsl:value-of select="$language"/></xsl:attribute>
				</xsl:if>
				<!-- Set type of note -->
				<xsl:attribute name="type"><xsl:value-of select="$typeInt"/></xsl:attribute>
				<!-- Set use of note -->
				<xsl:if test="$use != ''">
					<xsl:attribute name="use"><xsl:value-of select="$use"/></xsl:attribute>
				</xsl:if>
				<!-- Set author of note -->
				<xsl:if test="$author != ''">
					<xsl:attribute name="author"><xsl:value-of select="$author"/></xsl:attribute>
				</xsl:if>
				<!-- note -->
				<xsl:value-of select="$note"/>
			</xsl:element>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet>
