[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] how to populate drop down list


Subject: Re: [xsl] how to populate drop down list
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Fri, 22 Mar 2002 18:44:30 +0000

><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@xxxxxxxxxxxxx

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread