RE: [xsl] breaking string into substrings or arrays

Subject: RE: [xsl] breaking string into substrings or arrays
From: Ali Choumane <ali.choumane@xxxxxxx>
Date: Tue, 19 Apr 2005 17:48:13 +0200
Hi,

I have the same problem but with more delimeters, i can't know the kind of the 
first delimeter. 
  e.g  <Value>[Alpha, Beta; Gamma: Alpha .Beta]</Value> 

In my project I am dealing with at least 10 delimeters ? 
  
can I use tokenize() ? should I  download libraries to use this function?


Quoting Michael Kay <mike@xxxxxxxxxxxx>:

> 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@xxxxxxxxxxx] 
> > 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
> 


Ali CHOUMANE
M2R III ,Univ Joseph fourrier, UFR IMA
WAM/INRIA & GETA/CLIPS
portable.      06 71 55 80 65
Bureau(INRIA). 04 76 61 54 13 
Email. ali.choumane@xxxxxxx

-------------------------------------------------
envoyi via Webmail/IMAG !

Current Thread