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

looping over a string?

Subject: looping over a string?
From: Eric Scheid <eric.scheid@xxxxxxxxxxxxxxx>
Date: Mon, 23 Jan 2006 21:46:36 +1100
 looping over a string?
Is there some way I could loop over each character of a variable containing
the string "ABC[...]XYZ", passing that in as a parameter to a template, and
using that to select the appropriate node (or output 'none' if there are no
matching rows)?

Or is this the entirely wrong approach? (loops stink of procedural
processing)

I have xml data that looks like this:

<results>
<row>
    <letter>A</letter>
    <authors>22</authors>
    <articles>34</articles>
</row>
<!-- repeat for letters A to Z, but some might be missing -->
</results>

I want to generate this:

A: 22, 34
B: 32, 98
C: none
D: 5,6
... etc

e.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.