Re: [xsl] string manipulation

Subject: Re: [xsl] string manipulation
From: Steve Ball <Steve.Ball@xxxxxxxxx>
Date: Mon, 28 Oct 2002 21:20:52 +1000
john liao wrote:

I'm finding myself having to manipulate strings
because the tool that generates my xml can't generate
new elements that I need:

I want to parse the description so I can print
key: att1
key: att2
a: att2
a: att3
a: att4
a: att21
a: att25

I can't figure it out using substring-before or
substring-after. Your help is very much appreciated.

You want to recursively process the attribute value. First split on the white space, then on the '=' and finally split on the ',' characters.

For examples of how to recursively process a string,
try taking a look at the XSLT Standard Library's
string module.  See

Steve Ball

Steve Ball            |   XSLT Standard Library   | Training & Seminars
Zveno Pty Ltd         |     Web Tcl Complete      |   XML XSL Schemas |      TclXML TclDOM        | Tcl, Web Development
Steve.Ball@xxxxxxxxx  +---------------------------+---------------------
Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 6242 4099

XSL-List info and archive:

Current Thread