Forum Moderators: open
I usually state the value of an option explicitly, like this:
<option value="12345">Ford Prefect</option> in XSLT, this would turn into:
<select>
<xsl:for-each select="/item">
<option>
<xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
<xsl:value-of select="@name"/>
</option>
</xsl:for-each>
</select>
<select>
<xsl:for-each select="/item">
<option value="12345">Ford Prefect</option>
<option value="12345">Mercedes best</option>
<option value="12345">Fiat Perfect</option>
<xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
<xsl:value-of select="@name"/>
</option>
</xsl:for-each>
</select>
I have predefined values of items from server.