Subject: Re: [xsl] Transform min and max values to list? From: Ronald <ronald@xxxxxxxxxxx> Date: Thu, 19 Apr 2001 09:51:01 +0100 |
<xsl:call-template name="for.loop"> <xsl:with-param name="i">1</xsl:with-param> <xsl:with-param name="count">10</xsl:with-param> </xsl:call-template>
<xsl:template name="for.loop"> <xsl:param name="i"/> <xsl:param name="count"/> <xsl:if test="$i <= $count"> <!-- body of the loop goes here --> </xsl:if> <xsl:if test="$i <= $count"> <xsl:call-template name="for.loop">
<xsl:with-param name="i"> <!-- Increment index--> <xsl:value-of select="$i + 1"/> </xsl:with-param> <xsl:with-param name="count"> <xsl:value-of select="$count"/> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template> (code-bit in XML cooktop!)
I want to transform this element:
<number min="1" max="3"/>
into this:
<select> <option>1</option> <option>2</option> <option>3</option> </select>
I have looked at for-each but its select attribute requires a node-set. Is there a simple way to achieve what I want?
Thanks in advance.
-- Michael Strasser Brisbane, Australia
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Transform min and max values , Michael Strasser | Thread | Re: [xsl] Transform min and max val, Jeni Tennison |
AW: [xsl] how can I compare two xml, Mengel Andre (FV/SLM | Date | Fw: [xsl] a href incorporation, Tanzila Mohammad |
Month |