|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Newbie question: how to count equal nodes into one result el
Hello,
I have the following problem:
This is the source tree:
<count_this>
<tag>apple</tag>
<tag>apple</tag>
<tag>apple</tag>
<tag>banana</tag>
<tag>banana</tag>
<tag>cherry</tag>
<tag>cherry</tag>
<tag>cherry</tag>
<tag>cherry</tag>
</count_this>
The result tree should be something like this:
<result>
<tag><value>apple</value><occurred>3</occurred></tag>
<tag><value>banana</value><occurred>2</occurred></tag>
<tag><value>cherry</value><occurred>4</occurred></tag>
</result>
So generally the question is how can I count equal nodes and put the
result into one result node with XSLT?
Any idea would be appreciated.
Thank you.
Ferenc Tárkányi
project manager, R&D
ObjX International
tel: +36 13280090
e-mail: ferenc@xxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








