xsl-list
[Top] [All Lists]

Re: [xsl] XSL: Build a dynamic HTML Select from a single Quantity value

2008-08-07 09:10:56
I am somewhat new to writing style sheets but I am experienced in ASP / 
VBscript where I would handle this with a For / Next like:
<select name="Quantity">
   <% For count = 1 to Quantity
            response.write("<option value='" & count & "'>" & count & 
"</option>")
         Next %>
</select>

As you are using XSLT 2.0 you can just do:

<xsl:for-each select="1 to Quantity">
  <option value="{.}">
    <xsl:value-of select="."/>
..

:)


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>