[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: can we use html objects in xsl

Subject: Re: can we use html objects in xsl
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 26 May 2000 16:41:59 -0600 (MDT)
where we use 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.