xsl-list
[Top] [All Lists]

RE: breaking string into substrings or arrays

2005-04-19 08:06:07
If you search http://www.mulberrytech.com/xsl/xsl-list for tokenize, you
should be able to find examples of Michael's suggestions.

Douglas Ross 
Developer, HTML UI Framework 
Kronos 
www.kronos.com 


-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: Tuesday, April 19, 2005 11:03 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] breaking string into substrings or arrays

In XSLT 1.0 you have a choice:

(a) write a recursive template that bites off one token each time it's
called using substring-before

(b) use a tokenize() function from a library such as EXSLT
(www.exslt.org).

In 2.0 use the built-in tokenize() function, or xsl:analyze-string.

Michael Kay
http://www.saxonica.com/


-----Original Message-----
From: Rahil's Yahoo Mail [mailto:qamar_rahil(_at_)yahoo(_dot_)co(_dot_)uk] 
Sent: 19 April 2005 15:57
To: XSL List
Subject: [xsl] breaking string into substrings or arrays

Hi

Is it possible to break up a text() node which contains a 
string for e.g.

<Value>[Alpha, Beta, Gamma]</Value>

into

<Value>Alpha</Value>
<Value>Beta</Value>
<Value>Gamma</Value>

?
Is there any equivalent for arrays in XPath to break a long string as 
above based on a token such as comma (,) ?

Regards
Rahil



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>