dati xml
<dati>
<PRODOTTO>
<ID>9</ID>
</PRODOTTO>
<PRODOTTO>
<ID>7</ID>
</PRODOTTO>
</dati>


xsl

<xsl:variable name="Primo" select="/dati/PRODOTTO/ID"/>
<xsl:for-each select="/dati/PRODOTTO">
<xsl:variable name="prodotto" select="ID"/>

<xsl:if test="$prodotto=$Primo">
<xsl:text disable-output-escaping="yes">&lt;input type="radio" name="ID_SELEZIONE" value="</xsl:text>
<xsl:value-of select="ID_PC"/>
<xsl:text disable-output-escaping="yes">" checked="true"/&gt;</xsl:text>
</xsl:if>
<xsl:if test="not($prodotto=$Primo)">
<xsl:text disable-output-escaping="yes">&lt;input type="radio" name="ID_SELEZIONE" value="</xsl:text>
<xsl:value-of select="ID_PC"/>
<xsl:text disable-output-escaping="yes">" /&gt;</xsl:text>
</xsl:if>





Il problema è il motivo in cui passa 2 volte nella xsl:if dove disegna il radio checcato.....
Invece volevo soltanto checcare il primo ovviamente ID=9
E perchè ci passa 2 volte se i valori ID sono diversi?

Nel programma nella var Primo salva il valore 9 (ovviamente ID e così rimane fisso)
E nel for legge i valori ID e controllo se la var Primo è uguale a ID del for.....se è uguale allora disegno il radio checcato
altrimenti niente......
Spero di essermi spiegato bene.
Ciao