[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Recursive counting

Subject: Recursive counting
From: Steve <subsume@xxxxxxxxx>
Date: Tue, 18 Jul 2006 17:24:15 -0400
recursive counting
Well after success with my first recursive template I was all set to
make one of my own, but now shamefully am coming to the list for
advice over something that appears quite simple.

XML ------->

  <o type="A">who</o>
  <o type="A">what</o>
  <o type="A">when</o>
  <o type="B">how</o>
  <o type="B">nexus</o>
  <o type="B">triumph</o>
  <o type="C">alligator</o>
  <o type="C">spurn</o>

 <person pref="who" />
 <person pref="nexus" />
 <person pref="how" />
 <person pref="alligator" />
 <person pref="spurn" />
 <person pref="triumph" />
    .... etc ....

Desired output ------->

<!-- @count corresponds to number of times
the preference appeared among the list of <people> --->

 <out type="A" count="1" />
 <out type="B" count="3" />
 <out type="C" count="1" />

Stipulation: --------->

<out>'s must be sorted alphabetically, regardless of <option> order.

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.