[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:attribute with html option tags
Hi, I have a situation where I've got a form that I want to fill with values read from my xml. The user could then modify these values and submit the form. I've figured out how do this for text fields using the following format: <input type="text" size="40" maxlength="40" name="user_name"> <xsl:attribute name="value"><xsl:value-of select="user/name"/></xsl:attribute> </input> However, I now need to provide a value read in from the xml for a drop-down box (single-select). The <SELECT> tag does not provide a "value" attribute I can set. Instead, it just provides any number of <OPTION> tags, one for each item in the list. My list looks like the following: <select size="1" name="security_level"> <option> </option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> In order to use the "xsl:attribute" like I used with text fields, I'd need to know ahead of time which <option> tag to place it in... correct? But since I'm reading the number in from the xml, this implies I'd have to dynamically generate the <options> using javascript? Or is there an easier way? I know I can use a kludge and just make my first option line be "<option><xsl:value-of select="user/security"/></option>", but I don't want to do this because it will duplicate one of the existing options in the list. Any help would be appreciated. Thanks! Ken begin:vcard n:Schneider;Kenneth tel;pager:(888) 906-1338 tel;work:(414) 347-1303 x-mozilla-html:FALSE url:http://www.str.com org:Strategic Technology Resources version:2.1 email;internet:schneider@xxxxxxx title:Requirements Architect adr;quoted-printable:;;100 East Wisconsin Avenue=0D=0ASuite 2510;Milwaukee;Wisconsin;53202;US fn:Kenneth Schneider end:vcard This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by TREND InterScan for the presence of computer viruses.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|