Populating a Select Control from an XSL:Variable
I want to create and HTML <SELECT> control from an XSL:VARIABLE.
I have several of the same drop down in my html and want to leverage the XSL:variable to represent the options available. These options remain constant and I als need to select the option matching the value from the xml document I'm processing.
I haven't found anything to do this yet.
Something like...
<xsl:variable name="ddlOptions">
<option>
<value>days</value>
<displayValue>day(s)</displayValue>
</option>
<option>
<value>months</value>
<displayValue>month(s)</displayValue>
</option>
<option>
<value>years</value>
<displayValue>year(s)</displayValue>
</option>
</xsl:variable>
Now I need to loop thru this variable building the options for a select and select the correct option based on a value from my xml.
Sorry for the vagueness, but I can't find any real help out there.
|