W3C home > Mailing lists > Public > www-xsl-fo@w3.org > March 2002

Splitting a stirng

From: Brenda Bell <bbell@juicesoftware.com>
Date: Wed, 20 Mar 2002 11:02:07 -0500 (EST)
Message-ID: <846B0B02E1B78B49B678EDCC00EB29627468E5@mail01.ent.juice.com>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>
I have an XML document with an element whose content is a string containing
"fields" delimited by semi-colons.  Example:


I want to transform this element into something that looks like this:


Can I do this with XSL?  I'm familiar with the substring functions and while
I've never used them, I've read the documentation on the param and variable

If I were doing this in a programming language like VB, I'd set a variable
to the contents of <PACKEDINFO>, pop off the part before the first
semi-colon, create my new element and remove the text up to and including
the first semi-colon from the string setting me up for my next iteration.

Any comments on how I can do this with XSL would be greatly appreciated.  I
guess my biggest question is whether I should use a param or variable -- I'm
having difficulty distinguishing between them -- and whether I can change a
param or variable's value by simply declaring it again.  I'm very confused.
Received on Wednesday, 20 March 2002 11:46:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:54 UTC