<?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">
    <!---->
    <!-- template to insert -->
    <xsl:template name="Sender">
        <!---->
        <!-- parameter -->
        <xsl:param name="logicalID"/>
        <xsl:param name="componentID"/>
        <xsl:param name="confirmationCode"/>
        <xsl:param name="authorizationID"/>
        <!---->
        <!-- variables -->
        <!-- set logicalID -->
        <xsl:variable name="logicalIDInt">
            <xsl:choose>
                <xsl:when test="$logicalID != ''">
                    <xsl:value-of select="$logicalID"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="'#LOGICALID#'"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <!-- set componentID -->
        <xsl:variable name="componentIDInt">
            <xsl:choose>
                <xsl:when test="$componentID != ''">
                    <xsl:value-of select="$componentID"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="'#COMPONENTID#'"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <!-- set confirmationCode -->
        <xsl:variable name="confirmationCodeInt">
            <xsl:choose>
                <xsl:when test="$confirmationCode != ''">
                    <xsl:value-of select="$confirmationCode"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="'#CONFCODE#'"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <!-- set authorizationID -->
        <xsl:variable name="authorizationIDInt">
            <xsl:choose>
                <xsl:when test="$authorizationID != ''">
                    <xsl:value-of select="$authorizationID"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="'#AUTHORIZATIONID#'"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <xsl:element name="Sender">
            <xsl:element name="LogicalID">
                <xsl:value-of select="$logicalIDInt"/>
            </xsl:element>
            <xsl:element name="ComponentID">
                <xsl:value-of select="$componentIDInt"/>
            </xsl:element>
            <xsl:element name="ConfirmationCode">
                <xsl:value-of select="$confirmationCodeInt"/>
            </xsl:element>
            <xsl:element name="AuthorizationID">
                <xsl:value-of select="$authorizationIDInt"/>
            </xsl:element>
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>
