здесь идет мой тег XML
<NewDataSet>
<EETaxAmount>
<WageID>TX01</WageID>
<WageDesc>WithHoldingTax</WageDesc>
<TaxAuthorityName>FED</TaxAuthorityName>
<TaxAuthorityType>10</TaxAuthorityType>
<Amount>931.25</Amount>
<YTDAmount>982.92</YTDAmount>
</EETaxAmount>
<EETaxAmount>
<WageID>TXS1</WageID>
<WageDesc>WithHoldingTax(S)</WageDesc>
<TaxAuthorityName>FED</TaxAuthorityName>
<TaxAuthorityType>10</TaxAuthorityType>
<Amount>50.00</Amount>
<YTDAmount>50.00</YTDAmount>
</EETaxAmount>
</NewDataSet>`
Теперь мой вопрос: мне нужно отобразить значение witholdingtax как withholdingtax (R), если у меня есть withholdingtax (s) в наборе данных, иначе как withholdingtax, мой xsl такой, как показано ниже
<xsl:for-each select="//NewDataSet/EETaxAmount">
<xsl:sort select="TaxAuthorityType"/>
<tr>
<td class="txt5">
<xsl:value-of select="WageDesc"/>
</td>
<td class="txt5">
<xsl:value-of select="TaxAuthorityName"/>
</td>
<td class="txt_currency">
<xsl:choose>
<xsl:when test="Amount >=0 and Amount <=1">
<xsl:value-of select="format-number(Amount,'0.00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(Amount, '###,###.00')"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td class="txt_currency">
<xsl:choose>
<xsl:when test="YTDAmount >=0 and YTDAmount <1">
<xsl:value-of select="format-number(YTDAmount,'0.00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(YTDAmount, '###,###.00')"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>