PDA

View Full Version : XSLT Grouping


Joseph McGarvey
04-30-2003, 08:59 PM
Hi,
I am trying to output a "select" field from the sample XML below:

<tree>
<option>Ducks</option>
<option>Cows</option>
<option>Sheep</option>
<option>Sheep</option>
<option>Ducks</option>
<option>Cows</option>
<option>Cows</option>
</tree>

I need to group the option values to produce the sample HTML:

<select name="animals">
<option>Cows</option>
<option>Ducks</option>
<option>Sheep</option>
</select>

Can anyone help me with the grouping in XSLT?

I have read about Meunchian Grouping, but am confused...

Thanks!

HairyTeeth
05-30-2003, 03:27 AM
Hi,
I've just started with xml but I found this in my travels.
http://www.topxml.com/xsl/examplelistboxes_var.asp
It should be helpful.