<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="xml" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
	<xsl:param name="message"/>
	<xsl:param name="pageTitle">Outputs</xsl:param>
	<xsl:include href="namedtemplates.xsl"/>
	<xsl:template match="/">
		<html>
			<head>
				<title>
					<xsl:value-of select="$web_title"/>
				</title>
				<xsl:call-template name="common_imports"/>
			</head>
			<body onload="window.defaultStatus=''; StartFloat();">
				<xsl:call-template name="initROPage">
					<xsl:with-param name="pageName">outputs.py</xsl:with-param>
					<xsl:with-param name="message" select="$message"/>
				</xsl:call-template>
				<div id="displayresults">
					<h1 class="display">Outputs</h1>
					<xsl:apply-templates/>
				</div>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="configuration/egress">
		<xsl:choose>
			<xsl:when test="smpte310/output='On'">
				<div class="row">
					<div class="generalcell">
						<b>Port:</b>
					</div>
					<div class="generalcell">
        				SMPTE - 310M
                	</div>
				</div>
				<div class="row">
					<div class="generalcell">
						<b>Rate:</b>
					</div>
					<div class="generalcell">
        				19,392,658.46 bps
                	</div>
				</div>
			</xsl:when>
			<xsl:when test="asi/clock_mode='Off'">
				<div class="row">
					<div class="generalcell">
						<b>Port:</b>
					</div>
					<div class="generalcell">
        				ASI
                	</div>
				</div>
				<div class="row">
					<div class="generalcell">
						<b>Egress Clock Mode:</b>
					</div>
					<div class="generalcell">
						<xsl:value-of select="asi/clock_mode"/> (IPTV Only)
					</div>
				</div>
			</xsl:when>
			<xsl:otherwise>
				<div class="row">
					<div class="generalcell">
						<b>Port:</b>
					</div>
					<div class="largegeneralcell">
        				ASI
                	</div>
				</div>
				<div class="row">
					<div class="generalcell">
						<b>Modulation Target:</b>
					</div>
					<div class="largegeneralcell">
						<xsl:value-of select="asi/modulation_target"/>
					</div>
				</div>
				<div class="row">
					<div class="generalcell">
						<b>Egress Clock Mode:</b>
					</div>
					<div class="largegeneralcell">
						<xsl:value-of select="asi/clock_mode"/>
					</div>
				</div>
				<div class="row">
					<div class="generalcell">
						<b>Manual Rate:</b>
					</div>
					<div class="largegeneralcell">
						<xsl:value-of select="asi/egress_clock_rate"/>
					</div>
				</div>
				<div class="row">
					<xsl:if test="asi/modulation_target != 'QPSK'">
						<xsl:attribute name="style">visibility:hidden;</xsl:attribute>
					</xsl:if>
					<div class="generalcell">
						<b>QPSK Viterbi:</b>
					</div>
					<div class="largegeneralcell">
						<xsl:value-of select="asi/qpsk_viterbi"/>
					</div>
				</div>
				<div class="row">
					<xsl:if test="asi/modulation_target != 'QPSK'">
						<xsl:attribute name="style">visibility:hidden;</xsl:attribute>
					</xsl:if>
					<div class="generalcell">
						<b>QPSK Symbol Rate:</b>
					</div>
					<div class="largegeneralcell">
						<xsl:value-of select="asi/qpsk_symbol_rate"/>
					</div>
				</div>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="status/egress">
		<div class="row">
			<div class="generalcell">
				<b>Audio Type</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="../../audio/format"/>
			</div>
		</div>
		<div class="row">
			<div class="generalcell">
				<b>Data Rate</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="data_rate"/>  Mbps
			</div>
		</div>
		<div class="row">
			<div class="generalcell">
				<b>	Fill Rate</b>
			</div>
			<div class="largegeneralcell">
				<xsl:value-of select="fill_rate"/> Mbps
			</div>
		</div>
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="text()">
	</xsl:template>
</xsl:stylesheet>
