<?xml version="1.0" encoding="UTF-8"?>
<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">Plain Text</xsl:param>
	<xsl:variable name="NativePressureUnits">psi</xsl:variable>
	<xsl:variable name="TheSchema" select="document('rAcquityFTN-Method-r100.xsd')"/>
	<xsl:variable name="LanguageSubfolder" select="Locale:LanguageSubfolder()"/>
	<xsl:variable name="ResourceFile" select="concat($LanguageSubfolder,'\\rAcquityFTN-Resource-r100.xml')"/>
	<xsl:variable name="TheResources" select="document(string($ResourceFile))"></xsl:variable>

  <xsl:template match="LoadAhead">
    <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=". = 'ModeParallel_1'">
            <xsl:value-of  select="$TheResources//Enum[@id='BooleanEnabled_1D']/@value"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of  select="$TheResources//Enum[@id='BooleanDisabled_0D']/@value"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:with-param>
      <xsl:with-param name="InputPrompt">
        <xsl:value-of  select="$TheResources//Type[@name='tMode']/@prompt"/>
      </xsl:with-param>
      <xsl:with-param name="InputUnits">None</xsl:with-param>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template match="ColumnSelection">
    <xsl:choose>
      <xsl:when test="../ColSelValvePosition = 'Unknown_0'"/>
      <xsl:otherwise>
        <xsl:if test="../ColSelValvePosition = 'NoChange_1'">
          <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="$TheResources//Enum[@id='NoChange_1']/@value"/>
            </xsl:with-param>
            <xsl:with-param name="InputPrompt">
              <xsl:value-of  select="$TheResources//Type[@name='tColumnSelection']/@prompt"/>
            </xsl:with-param>
            <xsl:with-param name="InputUnits"></xsl:with-param>
          </xsl:call-template>
        </xsl:if>
        <xsl:call-template name="Emit"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
	<xsl:template match="PreHeaterMode">
		<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=". = 'MethodPreHeaterMode_0'">
						<xsl:value-of  select="$TheResources//Enum[@id='MethodPreHeaterMode_0']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'MethodPreHeaterMode_1'">
						<xsl:value-of  select="$TheResources//Enum[@id='MethodPreHeaterMode_1']/@value"/>
					</xsl:when>
					<xsl:when test=". = 'MethodPreHeaterMode_3'">
						<xsl:value-of  select="$TheResources//Enum[@id='MethodPreHeaterMode_3']/@value"/>
					</xsl:when>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="InputPrompt">
				<xsl:value-of  select="$TheResources//Type[@name='tMethodPreHeaterMode']/@prompt"/>
			</xsl:with-param>
			<xsl:with-param name="InputUnits">None</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

 
  <!--TEMP-->
  <!-- Combine alarm enable and alarm limit into a single representation -->
	<xsl:template match="SampleTemperatureLimit">
		<xsl:choose>
			<xsl:when test="../SampleTempAlarmEnable = 'true'">
				<xsl:call-template name="Emit"/>
			</xsl:when>
			<xsl:otherwise>
			<xsl:if test="../SampleTemperature != 'HeaterOff_-1'">
				<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="$TheResources//Enum[@id='BooleanDisabled_0D']/@value"/>
					</xsl:with-param>
					<xsl:with-param name="InputPrompt">
						<xsl:value-of  select="$TheResources//Type[@name='tSampleTemperatureLimit']/@prompt"/>
					</xsl:with-param>
					<xsl:with-param name="InputUnits"></xsl:with-param>
				</xsl:call-template>
			</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!-- Combine alarm enable and alarm limit into a single representation -->
	<xsl:template match="ColumnTemperatureLimit">
		<xsl:choose>
			<xsl:when test="../ColumnTempAlarmEnable = 'true'">
				<xsl:call-template name="Emit"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test="../ColumnTemperature != 'HeaterOff_-1'">
				<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="$TheResources//Enum[@id='BooleanDisabled_0D']/@value"/>
					</xsl:with-param>
					<xsl:with-param name="InputPrompt">
						<xsl:value-of  select="$TheResources//Type[@name='tColumnTemperatureLimit']/@prompt"/>
					</xsl:with-param>
					<xsl:with-param name="InputUnits"></xsl:with-param>
				</xsl:call-template>
				</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

  <!-- Combine alarm enable and alarm limit into a single representation -->
  <xsl:template match="SetAlarmBandDegC">
    <xsl:choose>
      <xsl:when test="../EnableAlarmBand = 'true'">
        <xsl:call-template name="Emit"/>
      </xsl:when>
      <xsl:otherwise>
        <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="$TheResources//Enum[@id='BooleanDisabled_0D']/@value"/>
          </xsl:with-param>
          <xsl:with-param name="InputPrompt">
            <xsl:value-of  select="$TheResources//Type[@name='tSampleTemperatureLimit']/@prompt"/>
          </xsl:with-param>
          <xsl:with-param name="InputUnits"></xsl:with-param>
        </xsl:call-template>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!--ADVANCED-->
  <xsl:template match="CustomRate | NeedleDepth | PreAspirateAir |PostAspirateAir">
		<xsl:variable name="VarName" select="name()"/>
		<xsl:variable name="TypeName">
			<xsl:value-of select="$TheSchema//xsd:element[@name=$VarName]/@type"/>
		</xsl:variable>
			<xsl:call-template name="Emit-Field-Value-Prompt">
				<xsl:with-param name="InputVar" select="$VarName"/>
				<xsl:with-param name="InputType">String</xsl:with-param>
				<xsl:with-param name="InputPrecision">0</xsl:with-param>
				<xsl:with-param name="InputValue">
					<xsl:if test=". = 'CustomDisable_-1'">
						<xsl:value-of  select="$TheResources//Enum[@id='CustomDisable_-1']/@value"/>
					</xsl:if>
					<xsl:if test=". != 'CustomDisable_-1'">
						 <xsl:value-of select="."/>
					</xsl:if>
				</xsl:with-param>
				<xsl:with-param name="InputPrompt">
          <xsl:choose>
            <xsl:when test="$VarName = 'PreAspirateAir'">
              <xsl:value-of  select="$TheResources//Type[@name=$TypeName]/Prompt[@id = 'PreAspirateAir']/@value"/>
            </xsl:when>
            <xsl:when test="$VarName = 'PostAspirateAir'">
              <xsl:value-of  select="$TheResources//Type[@name=$TypeName]/Prompt[@id = 'PostAspirateAir']/@value"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of  select="$TheResources//Type[@name=$TypeName]/@prompt"/>
            </xsl:otherwise>
          </xsl:choose>
				</xsl:with-param>
				<xsl:with-param name="InputUnits">
				<xsl:choose>
					<xsl:when test=". = 'CustomDisable_-1'">
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of  select="$TheResources//Type[@name=$TypeName]/@units"/>
					</xsl:otherwise>
				</xsl:choose>
				</xsl:with-param>
			</xsl:call-template>
	</xsl:template>

  <!-- Customize text for boolean Yes/No at end of FieldList -->
  <xsl:template match="rAcquityFTNMethod/NoInject">
    <xsl:if test="$printtype != 'Gradient'">
      <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' or . = 'yes'">
              <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='tNoInject']/@prompt"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">None</xsl:with-param>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

  <!--DILUTION-->
  <xsl:template match="DoDilution">
    <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='BooleanEnabled_1D']/@value"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of  select="$TheResources//Enum[@id='BooleanDisabled_0D']/@value"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:with-param>
      <xsl:with-param name="InputPrompt">
        <xsl:value-of  select="$TheResources//Type[@name='tDilution']/@prompt"/>
      </xsl:with-param>
      <xsl:with-param name="InputUnits">None</xsl:with-param>
    </xsl:call-template>
  </xsl:template>
  
  <!--CHANNELS-->
  <!-- Customize text for data channel booleans -->
  <xsl:template match="SampleTemperatureDataEnable | ElevatorTemperatureDataEnable | ColumnTemperatureDataEnable | AmbientTemperatureDataEnable | SamplePressureDataEnable | PreheaterTemperatureDataEnable| SealForceDataEnable | EnableColumnTempDataChannel ">
    <xsl:variable name="varname">
      <xsl:value-of select="name()"/>
    </xsl:variable>
    <xsl:if test="$printtype != 'Gradient' and $printtype != 'Brief' ">
      <xsl:call-template name="Emit-Field-Value-Prompt">
        <xsl:with-param name="InputVar" select="$varname"/>
        <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='tDataEnable']/Prompt[@id=$varname]/@value"/>
        </xsl:with-param>
        <xsl:with-param name="InputUnits">None</xsl:with-param>
      </xsl:call-template>

      <xsl:if test="name() = 'DegasserPressureDataEnable'">
        <xsl:text disable-output-escaping="yes">
					&lt;/FieldList&gt;
				</xsl:text>
      </xsl:if>
    </xsl:if>
  </xsl:template>

  <!--EVENTS-->
  <!-- Customize text for boolean Yes/No at end of FieldList -->
  <xsl:template match="rAcquityFTNMethod/RunEvents">
    <xsl:if test="$printtype != 'Gradient'">
      <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' or . = 'yes'">
              <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:text disable-output-escaping="yes">
				&lt;/FieldList&gt;
			</xsl:text>
    </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>

  <!-- OMIT-->
  <xsl:template match="LoopOfflineEnabled"></xsl:template>
  <xsl:template match="WashSolventType"></xsl:template>
  <xsl:template match="PurgeSolventType"></xsl:template>
  <xsl:template match="WashSolventXml"></xsl:template>
  <xsl:template match="PurgeSolventXml"></xsl:template>
  <xsl:template match="ColumnTempAlarmEnable"></xsl:template>
  <xsl:template match="SampleTempAlarmEnable"></xsl:template>
  <xsl:template match="ColSelValvePosition"></xsl:template>

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



</xsl:stylesheet>
