This is my XML:
<LIGHT_DESCRIPTION_LIST>
<LIGHT_DESCRIPTION>
<LIGHT_CHARACTERISTICS>Fl</LIGHT_CHARACTERISTICS>
<LIGHT_CATEGORY>17</LIGHT_CATEGORY>
</LIGHT_DESCRIPTION>
<LIGHT_DESCRIPTION>
<LIGHT_CHARACTERISTICS>Fl</LIGHT_CHARACTERISTICS>
<LIGHT_CATEGORY>UNKNOWN</LIGHT_CATEGORY>
</LIGHT_DESCRIPTION>
<LIGHT_DESCRIPTION>
<LIGHT_CHARACTERISTICS>Fl</LIGHT_CHARACTERISTICS>
<LIGHT_CATEGORY>UNKNOWN</LIGHT_CATEGORY>
</LIGHT_DESCRIPTION>
<LIGHT_DESCRIPTION>
<LIGHT_CHARACTERISTICS>Fl</LIGHT_CHARACTERISTICS>
<LIGHT_CATEGORY>17</LIGHT_CATEGORY>
</LIGHT_DESCRIPTION>
<LIGHT_DESCRIPTION>
<LIGHT_CHARACTERISTICS>Fl</LIGHT_CHARACTERISTICS>
<LIGHT_CATEGORY>UNKNOWN</LIGHT_CATEGORY>
</LIGHT_DESCRIPTION>
<LIGHT_DESCRIPTION>
<LIGHT_CHARACTERISTICS>Fl</LIGHT_CHARACTERISTICS>
<LIGHT_CATEGORY>17</LIGHT_CATEGORY>
</LIGHT_DESCRIPTION>
<LIGHT_DESCRIPTION>
<LIGHT_CHARACTERISTICS>Fl</LIGHT_CHARACTERISTICS>
<LIGHT_CATEGORY>17</LIGHT_CATEGORY>
</LIGHT_DESCRIPTION>
</LIGHT_DESCRIPTION_LIST>
This is my XSLT:
<xsl:for-each select="LIGHT_DESCRIPTION_LIST">
<xsl:for-each select="LIGHT_DESCRIPTION">
<xsl:if test="LIGHT_CATEGORY = '17'">
<xsl:text>IRA</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
In output I had:
IRA IRA IRA IRA
I would : IRA ( if exist a light category = 17 write only one time IRA without Repetition)