|
Subject: Re: [xsl] looping over a string? From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 23 Jan 2006 11:00:30 GMT |
> Is there some way I could loop over each character of a variable containing
> the string "ABC[...]XYZ",
in xpath2 you could use (for-example) string-to-codepoints() to get a
sequence to iterate over.
In xslt1 you'd have to use a recursive template or an extension
function. Previously when I've wanted to iterate over an alphabet I've
given myself an input document rather than a string to start with:
<x>
<l>A</l><l>B</l>....
so that for-each over document('letters.xml')/x/l
does what you want.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] looping over a string?, Eric Scheid | Thread | Re: [xsl] looping over a string?, Eric Scheid |
| [xsl] looping over a string?, Eric Scheid | Date | Re: [xsl] Unable to get text() of n, Kasimier Buchcik |
| Month |