This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to populate drop down list


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]