This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how to populate drop down list
- From: Trevor Nash <tcn at melvaig dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 22 Mar 2002 18:44:30 +0000
- Subject: Re: [xsl] how to populate drop down list
- Organization: Melvaig Software Engineering Limited
- References: <2DE78F33FFE0D3118C0200508B94F9CA11590432@uswaumsx08medge.med.ge.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
><xsl:for-each select="./question/answer">
> <select>
> <xsl:for-each select="@match">
> <option>
> <xsl:value-of select="."/>
> </option>
> </xsl:for-each>
></select>
></xsl:for-each>
>----------
I think you mean:
<!-- the ./ is not needed, and the list covers the whole question -->
<xsl:for-each select="question">
<select>
<!- now you want an option for each answer -->
<xsl:for-each select="answer">
<option>
<!-- the option value is the match attribute
from an answer -->
<xsl:value-of select="@match"/>
</option>
</xsl:for-each>
</select>
</xsl:for-each>
Regards,
Trevor Nash
--
Traditional training & distance learning,
Consultancy by email
Melvaig Software Engineering Limited
voice: +44 (0) 1445 771 271
email: tcn@melvaig.co.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list