<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet SYSTEM "http://commons.omniupdate.com/dtd/standard.dtd">
<xsl:stylesheet version="3.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:ou="http://omniupdate.com/XSL/Variables"
    xmlns:fn="http://omniupdate.com/XSL/Functions"
    xmlns:ouc="http://omniupdate.com/XSL/Variables"
    exclude-result-prefixes="ou xsl xs fn ouc">


<!-- This template assumes three variables from page props - $ASPNET-server-model , $CodeFIle , $Inherits
<!-- Call this template above the DOCTYPE html -->


<xsl:template name="csharp-declaration">
    <xsl:choose>
        <xsl:when test="$ou:action ='pub'">
            <xsl:choose>
                <xsl:when test="$ASPNET-server-model = 'webpage-cs'">
                    <xsl:text disable-output-escaping="yes">&lt;%@</xsl:text> Page Language="C#" AutoEventWireup="true" <xsl:text disable-output-escaping="yes">%&gt;</xsl:text>
                </xsl:when>
                <xsl:when test="$ASPNET-server-model = 'codefile-cs'">
                    <xsl:text disable-output-escaping="yes">&lt;%@</xsl:text> Page Language="C#" AutoEventWireup="true" CodeFile="<xsl:value-of select="$CodeFile"/>" Inherits="<xsl:value-of select="$Inherits"/>" <xsl:text disable-output-escaping="yes">%&gt;</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:text disable-output-escaping="yes">&lt;%@</xsl:text> Page Language="C#" AutoEventWireup="true" <xsl:text disable-output-escaping="yes">%&gt;</xsl:text>
                </xsl:otherwise>
            </xsl:choose><!-- end choose when ASPNET - Server Model -->
        </xsl:when>
        <xsl:otherwise></xsl:otherwise>
    </xsl:choose>
</xsl:template>

</xsl:stylesheet>
