SELECT form element with XML and XSL

webmasterbeta

New Member
Hi,I have structured XML data and want to transform them to a HTML form.The XML document contains an element with a value chosen from list ofvalues, which are also available in the document. Something like this:<colorselector><colors><color value=http://forums.devx.com/archive/index.php/"r">Red</color><color value="g">Green</color><color value="b">Blue</color></colors><mycolor value="g" /></colorselector>...or something similar.Well, my problem is to create a XSL which transforms this to select elementlike this:(my actual problem is the'selected' for the 'Green' option)<select name="mycolor"><option value=http://forums.devx.com/archive/index.php/"r">Red</option><option value="g" selected >Green</option><option value="b">Blue</option></select>Thank youPeter
 
Back
Top