<?xml version="1.0" encoding="UTF-8"?>
<!--
	PrintType	Description
	++++++++	+++++++++
	Brief		Basic parameters only; no analog out, thresholds or events
	Summary	Basic parameters and analog out
	Full			Basic parameters, analog out, thresholds and events
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:Locale="urn:Locale-namespace">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:include href="DefaultPrint-r102.xsl"/>
  <xsl:param name="printtype">Full</xsl:param>
  <xsl:variable name="NativePressureUnits">psi</xsl:variable>
  <xsl:variable name="TheSchema" select="document('AltusA30FL-Method-r100.xsd')"></xsl:variable>
  <xsl:variable name="LanguageSubfolder" select="Locale:LanguageSubfolder()"/>
  <xsl:variable name="ResourceFile" select="concat($LanguageSubfolder,'\\AltusA30FL-Resource-r100.xml')"/>
  <xsl:variable name="TheResources" select="document(string($ResourceFile))"></xsl:variable>

	<!-- Customize output of Detector Mode -->
	<xsl:template match="DetectorMode">
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
					<xsl:when test=". = 'DetectorMode_1'">
						<xsl:value-of select="$TheResources//Enum[@id='DetectorMode_1']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DetectorMode_2'">
						<xsl:value-of select="$TheResources//Enum[@id='DetectorMode_2']/@value"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$TheResources//Enum[@id='DetectorMode_3']/@value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tDetectorMode']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

  <xsl:template match="Lamp">
    <xsl:call-template name="Emit-Field-Value-Prompt">
      <xsl:with-param name="InputVar" select="name()"/>
      <xsl:with-param name="InputType">String</xsl:with-param>
      <xsl:with-param name="InputPrecision">0</xsl:with-param>
      <xsl:with-param name="InputValue">
        <xsl:choose>
          <xsl:when test=". = 'true'">
            <xsl:value-of select="$TheResources//Enum[@id='BooleanOn_1B']/@value"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="$TheResources//Enum[@id='BooleanOff_0B']/@value"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:with-param>
      <xsl:with-param name="InputPrompt">
        <xsl:value-of select="$TheResources//Type[@name='tLamp']/@prompt"/>
      </xsl:with-param>
      <xsl:with-param name="InputUnits">None</xsl:with-param>
    </xsl:call-template>
    <xsl:text disable-output-escaping="yes">
			&lt;/FieldList&gt;
		</xsl:text>
  </xsl:template>

  <!-- 2D Channels -->
  <!-- Emit ChannelA...D only in 2D mode, and only when enabled -->
	<xsl:template match="ChannelA | ChannelB | ChannelC | ChannelD">
		<xsl:if test="//DetectorMode = 'DetectorMode_1' and ./Enable = 'true'" >
			<xsl:call-template name="Emit"/>
		</xsl:if>
	</xsl:template>

	<!-- Don't emit the 'Enable' element of ChannelA...D -->
	<xsl:template match="ChannelA/Enable | ChannelB/Enable | ChannelC/Enable | ChannelD/Enable">
	</xsl:template>

  <!-- Don't emit the 'Name' element of ChannelA...D -->
  <xsl:template match="ChannelA/Name | ChannelB/Name | ChannelC/Name | ChannelD/Name">
  </xsl:template>

  <xsl:template match="ChannelA/DataMode">
		<xsl:variable name="dataMode" select="."/>
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
					<xsl:when test=". = 'Emission_1A' ">
						<xsl:value-of select="$TheResources//Enum[@id='Emission_1A']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'MaxPlot_8A' ">
						<xsl:value-of select="$TheResources//Enum[@id='MaxPlot_8A']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceAB_11A' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceAB_11A']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceBA_12A' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceBA_12A']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'SingleChannel_1E' ">
						<xsl:value-of select="$TheResources//Enum[@id='SingleChannel_1E']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'Emission_1F' ">
						<xsl:value-of select="$TheResources//Enum[@id='Emission_1F']/@value"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$dataMode"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tDataMode']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<xsl:template match="ChannelB/DataMode">
		<xsl:variable name="dataMode" select="."/>
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
					<xsl:when test=". = 'Emission_2B' ">
						<xsl:value-of select="$TheResources//Enum[@id='Emission_2B']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'MaxPlot_8B' ">
						<xsl:value-of select="$TheResources//Enum[@id='MaxPlot_8B']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceAB_11B' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceAB_11B']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceBA_12B' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceBA_12B']/@value"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$dataMode"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tDataMode']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<xsl:template match="ChannelC/DataMode">
		<xsl:variable name="dataMode" select="."/>
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
					<xsl:when test=". = 'Emission_3C' ">
						<xsl:value-of select="$TheResources//Enum[@id='Emission_3C']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'MaxPlot_8C' ">
						<xsl:value-of select="$TheResources//Enum[@id='MaxPlot_8C']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceAB_11C' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceAB_11C']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceBA_12C' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceBA_12C']/@value"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$dataMode"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tDataMode']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<xsl:template match="ChannelD/DataMode">
		<xsl:variable name="dataMode" select="."/>
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
					<xsl:when test=". = 'Emission_4D' ">
						<xsl:value-of select="$TheResources//Enum[@id='Emission_4D']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'MaxPlot_8D' ">
						<xsl:value-of select="$TheResources//Enum[@id='MaxPlot_8D']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceAB_11D' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceAB_11D']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'DifferenceBA_12D' ">
						<xsl:value-of select="$TheResources//Enum[@id='DifferenceBA_12D']/@value"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$dataMode"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tDataMode']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

  <!-- 3D Mode Channel -->
  <xsl:template match="Scan">
		<xsl:if test="//DetectorMode = 'DetectorMode_2'" >
			<xsl:call-template name="Emit"/>
		</xsl:if>
	</xsl:template>

	<xsl:template match="ScanType">
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
					<xsl:when test=". = 'ScanType_0'">
						<xsl:value-of select="$TheResources//Enum[@id='ScanType_0']/@value"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$TheResources//Enum[@id='ScanType_1']/@value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tScanType']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

  <!-- 2D Plot Channel -->
  <xsl:template match="Plot3D/ExcitationWavelength1">
		<xsl:if test="//DetectorMode = 'DetectorMode_3'" >
      <xsl:variable name="excitationWavelength1" select="."/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:value-of select="$excitationWavelength1"/>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dStartExcitationWavelength']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dStartExcitationWavelength']/@units"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
	</xsl:template>

  <xsl:template match="Plot3D/ExcitationWavelength2">
    <xsl:if test="//DetectorMode = 'DetectorMode_3'" >
      <xsl:variable name="excitationWavelength2" select="."/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:value-of select="$excitationWavelength2"/>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dEndExcitationWavelength']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dEndExcitationWavelength']/@units"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

  <xsl:template match="Plot3D/EmissionWavelength1">
    <xsl:if test="//DetectorMode = 'DetectorMode_3'" >
      <xsl:variable name="emissionWavelength1" select="."/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:value-of select="$emissionWavelength1"/>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dStartEmissionWavelength']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dStartEmissionWavelength']/@units"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

  <xsl:template match="Plot3D/EmissionWavelength2">
    <xsl:if test="//DetectorMode = 'DetectorMode_3'" >
      <xsl:variable name="emissionWavelength2" select="."/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:value-of select="$emissionWavelength2"/>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dEndEmissionWavelength']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">
          <xsl:value-of select="$TheResources//Type[@name='tPlot3dEndEmissionWavelength']/@units"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

  <xsl:template match="ExcitationIncrement">
    <xsl:if test="//DetectorMode = 'DetectorMode_3'" >
      <xsl:variable name="excitationIncrement" select="."/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:choose>
            <xsl:when test=". = 'ExcitationIncr_9' ">
              <xsl:value-of select="$TheResources//Enum[@id='ExcitationIncr_9']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'ExcitationIncr_45' ">
              <xsl:value-of select="$TheResources//Enum[@id='ExcitationIncr_45']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'ExcitationIncr_90' ">
              <xsl:value-of select="$TheResources//Enum[@id='ExcitationIncr_90']/@value"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="$excitationIncrement"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tExcitationIncr']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">
          <xsl:value-of select="$TheResources//Type[@name='tExcitationIncr']/@units"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
	</xsl:template>

	<xsl:template match="EmissionIncrement">
    <xsl:if test="//DetectorMode = 'DetectorMode_3'" >
		  <xsl:variable name="emissionIncrement" select="."/>
		  <xsl:call-template name="Emit-Field-Value-Prompt">
			  <xsl:with-param name="InputVar" select="name()"/>
			  <xsl:with-param name="InputType">String</xsl:with-param>
			  <xsl:with-param name="InputPrecision">0</xsl:with-param>
			  <xsl:with-param name="InputValue">
				  <xsl:choose>
					  <xsl:when test=". = 'EmissionIncr_7' ">
						  <xsl:value-of select="$TheResources//Enum[@id='EmissionIncr_7']/@value"/>
					  </xsl:when>
					  <xsl:when test=". = 'EmissionIncr_35' ">
						  <xsl:value-of select="$TheResources//Enum[@id='EmissionIncr_35']/@value"/>
					  </xsl:when>
					  <xsl:when test=". = 'EmissionIncr_70' ">
						  <xsl:value-of select="$TheResources//Enum[@id='EmissionIncr_70']/@value"/>
					  </xsl:when>
					  <xsl:otherwise>
						  <xsl:value-of select="$emissionIncrement"/>
					  </xsl:otherwise>
				  </xsl:choose>
			  </xsl:with-param>
			  <xsl:with-param name="InputPrompt">
				  <xsl:value-of select="$TheResources//Type[@name='tEmissionIncr']/@prompt"/>
			  </xsl:with-param>
			  <xsl:with-param name="InputUnits">
				  <xsl:value-of select="$TheResources//Type[@name='tEmissionIncr']/@units"/>
			  </xsl:with-param>
		  </xsl:call-template>
    </xsl:if>
  </xsl:template>
  
	<xsl:template match="Polarity">
			<xsl:variable name="polarity" select="."/>
			<xsl:call-template name="Emit-Field-Value-Prompt">
				<xsl:with-param name="InputVar" select="name()"/>
				<xsl:with-param name="InputType">String</xsl:with-param>
				<xsl:with-param name="InputPrecision">0</xsl:with-param>
				<xsl:with-param name="InputValue">
					<xsl:choose>
						<xsl:when test=". = 'NormalPolarity_1' ">
							<xsl:value-of select="$TheResources//Enum[@id='NormalPolarity_1']/@value"/>
						</xsl:when>
						<xsl:when test=". = 'InversePolarity_0' ">
							<xsl:value-of select="$TheResources//Enum[@id='InversePolarity_0']/@value"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$polarity"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tPolarity']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">None</xsl:with-param>
			</xsl:call-template>
	</xsl:template>

	<xsl:template match="DataOffset">
    <xsl:if test="0" >
      <xsl:variable name="dataOffset" select="."/>
		  <xsl:call-template name="Emit-Field-Value-Prompt">
			  <xsl:with-param name="InputVar" select="name()"/>
			  <xsl:with-param name="InputType">String</xsl:with-param>
			  <xsl:with-param name="InputPrecision">0</xsl:with-param>
			  <xsl:with-param name="InputValue">
				  <xsl:value-of select="$dataOffset"/>
			  </xsl:with-param>
			  <xsl:with-param name="InputPrompt">
				  <xsl:value-of select="$TheResources//Type[@name='tDataOffset']/@prompt"/>
			  </xsl:with-param>
			  <xsl:with-param name="InputUnits">
				  <xsl:value-of select="$TheResources//Type[@name='tDataOffset']/@units"/>
			  </xsl:with-param>
		  </xsl:call-template>
    </xsl:if>
  </xsl:template>

	<!-- Customize text for boolean Yes/No before end of FieldList -->
	<xsl:template match="ChartMarkEnable">
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
					<xsl:when test=". = 'true'">
						<xsl:value-of select="$TheResources//Enum[@id='BooleanYes_1A']/@value"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$TheResources//Enum[@id='BooleanNo_0A']/@value"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tChartMarkEnable']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

  <xsl:template match="DataRate">
    <xsl:text disable-output-escaping="yes">
			&lt;FieldList&gt;&lt;Title&gt;&lt;/Title&gt;
		</xsl:text>
    <xsl:if test="//DetectorMode != 'DetectorMode_3'" >
      <xsl:variable name="dataRate" select="."/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:choose>
            <xsl:when test=". = 'Ch1_1A' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch1_1A']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch1_2A' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch1_2A']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch1_5A' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch1_5A']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch1_10A' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch1_10A']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch1_20A' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch1_20A']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch1_40A' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch1_40A']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch1_80A' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch1_80A']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch2_1B' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch2_1B']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch2_2B' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch2_2B']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch3_1C' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch3_1C']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'Ch4_1D' ">
              <xsl:value-of select="$TheResources//Enum[@id='Ch4_1D']/@value"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="$dataRate"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tDataRate']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">
          <xsl:value-of select="$TheResources//Type[@name='tDataRate']/@units"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

  <xsl:template match="DataUnits">
			<xsl:variable name="dataUnits" select="."/>
			<xsl:call-template name="Emit-Field-Value-Prompt">
				<xsl:with-param name="InputVar" select="name()"/>
				<xsl:with-param name="InputType">String</xsl:with-param>
				<xsl:with-param name="InputPrecision">0</xsl:with-param>
				<xsl:with-param name="InputValue">
					<xsl:choose>
						<xsl:when test=". = 'DataUnitsEmission_1' ">
							<xsl:value-of select="$TheResources//Enum[@id='DataUnitsEmission_1']/@value"/>
						</xsl:when>
						<xsl:when test=". = 'DataUnitsEnergy_2' ">
							<xsl:value-of select="$TheResources//Enum[@id='DataUnitsEnergy_2']/@value"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$dataUnits"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:with-param>
				<xsl:with-param name="InputPrompt">
					<xsl:value-of select="$TheResources//Type[@name='tDataUnits']/@prompt"/>
				</xsl:with-param>
				<xsl:with-param name="InputUnits">None</xsl:with-param>
			</xsl:call-template>
	</xsl:template>

	<xsl:template match="FilterType">
	</xsl:template>

  <xsl:template match="TimeConstant">
    <xsl:if test="//DetectorMode != 'DetectorMode_3'" >
      <xsl:call-template name="Emit"/>
    </xsl:if>
  </xsl:template>

  <xsl:template match="AutoZeroInjectStart">
		<xsl:call-template name="Emit-Field-Value-Prompt">
			<xsl:with-param name="InputVar" select="name()"/>
			<xsl:with-param name="InputType">String</xsl:with-param>
			<xsl:with-param name="InputPrecision">0</xsl:with-param>
			<xsl:with-param name="InputValue">
				<xsl:choose>
          <xsl:when test=". = 'true'">
            <xsl:value-of select="$TheResources//Enum[@id='BooleanYes_1A']/@value"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="$TheResources//Enum[@id='BooleanNo_0A']/@value"/>
          </xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of select="$TheResources//Type[@name='tAutoZeroInjectStart']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<xsl:template match="AutoZeroEventOrKey">
	</xsl:template>

	<xsl:template match="AutoZeroOnGainChange">
    <xsl:if test="//DetectorMode != 'DetectorMode_3'" >
      <xsl:variable name="autoZeroOnGainChange" select="."/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:choose>
            <xsl:when test=". = 'AzDisable_1' ">
              <xsl:value-of select="$TheResources//Enum[@id='AzDisable_1']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'AzZero_2' ">
              <xsl:value-of select="$TheResources//Enum[@id='AzZero_2']/@value"/>
            </xsl:when>
            <xsl:when test=". = 'AzBaseline_3' ">
              <xsl:value-of select="$TheResources//Enum[@id='AzBaseline_3']/@value"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="$autoZeroOnGainChange"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tAutoZeroWavelength']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">None</xsl:with-param>
      </xsl:call-template>
    </xsl:if>
	</xsl:template>

  <xsl:template match="RunEvents">
    <xsl:if test="//DetectorMode != 'DetectorMode_3'" >
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:choose>
            <xsl:when test=". = 'true'">
              <xsl:value-of select="$TheResources//Enum[@id='BooleanYes_1A']/@value"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="$TheResources//Enum[@id='BooleanNo_0A']/@value"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tRunEvents']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">None</xsl:with-param>
      </xsl:call-template>
    </xsl:if>
    <xsl:text disable-output-escaping="yes">
			&lt;/FieldList&gt;
		</xsl:text>
  </xsl:template>

  <xsl:template match="Threshold1/Enable | Threshold2/Enable">
  </xsl:template>

  <xsl:template match="PulseWidth">
    <xsl:if test="//DetectorMode != 'DetectorMode_3'" >
      <xsl:call-template name="Emit"/>
    </xsl:if>
  </xsl:template>

  <xsl:template match="RectWavePeriod">
    <xsl:if test="//DetectorMode != 'DetectorMode_3'" >
      <xsl:call-template name="Emit"/>
    </xsl:if>
  </xsl:template>

  <!-- Don't emit event table if brief or summary report is requested -->
  <xsl:template match="EventTable">
    <xsl:if test="$printtype = 'Full' or $printtype = 'Plain Text'">
      <xsl:call-template name="Emit"/>
    </xsl:if>
  </xsl:template>

  <!-- Exclude analog out from Brief -->
  <xsl:template match="Analog1">
    <xsl:if test="$printtype != 'Brief'">
      <xsl:call-template name="Emit-FieldList-Analog">
        <xsl:with-param name="InputValue" select="$TheResources//Type[@name='tAnalog1']/@prompt"/>
      </xsl:call-template>

      </xsl:if>
  </xsl:template>

  <xsl:template match="Analog2">
    <xsl:if test="$printtype != 'Brief'">
      <xsl:variable name="MultiAnalog">
        <xsl:choose>
          <xsl:when test="//DetectorMode = 'DetectorMode_1' and //ChannelB/Enable = 'true'">1</xsl:when>
          <xsl:when test="//DetectorMode = 'DetectorMode_2'" >1</xsl:when>
          <xsl:otherwise>0</xsl:otherwise>
        </xsl:choose>
      </xsl:variable>
      <xsl:if test="$MultiAnalog = 1">
        <xsl:call-template name="Emit-FieldList-Analog">
          <xsl:with-param name="InputValue" select="$TheResources//Type[@name='tAnalog2']/@prompt"/>
        </xsl:call-template>
      </xsl:if>

    </xsl:if>
  </xsl:template>

  <xsl:template name="Emit-FieldList-Analog">
    <xsl:param name="InputVar"/>
    <xsl:param name="InputType"/>
    <xsl:param name="InputValue"/>

    <xsl:element name="FieldList">
      <xsl:element name="Title">
        <xsl:value-of select="$InputVar"/>
      </xsl:element>

      <xsl:apply-templates/>
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">String</xsl:with-param>
        <xsl:with-param name="InputPrecision">0</xsl:with-param>
        <xsl:with-param name="InputValue">
          <xsl:value-of select="$InputValue"/>
        </xsl:with-param>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tAnalogOut']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">None</xsl:with-param>
      </xsl:call-template>

    </xsl:element>
  </xsl:template>  
  
  
  

  <!-- Exclude the threshold groups -->
  <xsl:template match="Threshold1 | Threshold2">
  </xsl:template>

  <!-- In Scan mode, convert the output wavelength index to the wavelength in nm. -->
  <xsl:template match="OutputWavelength">
    <xsl:if test="//DetectorMode = 'DetectorMode_2'" >
      <xsl:variable name="StepSize" select="(number(//Scan/Wavelength2) - number(//Scan/Wavelength1)) div 20" />
      <xsl:variable name="Index" select="number(.)"/>
      <xsl:variable name="Wavelength" select="number(//Scan/Wavelength1) + ( $Index * $StepSize )" />
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="name()"/>
        <xsl:with-param name="InputType">Float</xsl:with-param>
        <xsl:with-param name="InputPrecision">1</xsl:with-param>
        <xsl:with-param name="InputValue" select="format-number($Wavelength,'0.0')"/>
        <xsl:with-param name="InputPrompt">
          <xsl:value-of select="$TheResources//Type[@name='tOutputWavelengthIndex']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">
          <xsl:value-of select="$TheResources//Type[@name='tOutputWavelengthIndex']/@units"/>
        </xsl:with-param>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

  <xsl:template match="AltusA30FLMethod">
		<xsl:element name="AltusA30FLMethod">
			<xsl:apply-templates/>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet>
