Hello,
I have the following XML (partial) document :
<export>
<table name="CLIENT">
<row>
<col name="CODE_CLIENT" type="System.String">1000010026</col>
<col name="LIBELLE" type="System.String">Test|</col>
<col name="PROSPECT" type="System.Decimal">1</col>
</row>
<row>
<col name="CODE_CLIENT" type="System.String">1000010025</col>
<col name="LIBELLE" type="System.String">Rue de la 2eme ad|</col>
<col name="PROSPECT" type="System.Decimal">0</col>
</row>
<row>
<col name="CODE_CLIENT" type="System.String">1000010125</col>
<col name="LIBELLE" type="System.String">Test4</col>
<col name="PROSPECT" type="System.Decimal">0</col>
</row>
<row>
<col name="CODE_CLIENT" type="System.String">1000010035</col>
<col name="LIBELLE" type="System.String">Rue</col>
<col name="PROSPECT" type="System.Decimal">1</col>
</row>
</table></export>
and the following XSL :
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="export/table[@name='CLIENT']"/>
</xsl:template>
<xsl:template match="row">
SOME TEMPLATE CODE
</xsl:template>
</xsl:stylesheet>
I would like to apply the first template (match="/") only to the "rows" that have prospect value to 1. In my exemple that would only transform the first and last rows.
I tried
<xsl:apply-templates select="export/table[@name='CLIENT']/row[col[@name='PROSPECT']=1]"/>
but that gave me a syntax error.
Anyone knows how to proceed ?