|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: can we use html objects in xsl
> lets say we have a xml like
> <groupinfo >
> <name > users </name>
> <ids> <id> 111</id>
> <id > 222</id>
> <id> 333<i/d >
> </ids>
> </groupinfo>
>
> I want the html ouptut like
>
> <input = text , name = "name" value = "user">
> <select name = id>
> <option value = 111>111
> <option value = 222>222
> <option value = 333>333
> </select>
Use xsl:output method="html" and this template:
<xsl:template match="groupinfo">
<input type="text" name="name" value="{normalize-space(name)}"/>
<select name="id">
<xsl:for-each select="ids/id">
<option value="normalize-space()">
<xsl:value-of select="normalize-space()"/>
</option>
</xsl:for-each>
</select>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








