p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

xslt thread: integer position of a target string in a source string


Message #1 by "Phil Perks" <philp@w...> on Thu, 29 Jun 2000 12:50:48
Posted on behalf of:

Newsha Makooi [mailto:Newsha@i...]
Subject: XSLT Programmer's Reference 3129


I am looking for a way to find the integer position of a target string in a 
source string.  I cannot find any such examples in this book.

For example, I need to find on what position does "/" begin in a source 
string such as "Newsha/Makooi".  Also, how can XSLT be used to return the 
number of occurrences of the "/" in a source string.  In other words, how 
can I count the number of occurrences of the "/" in 
"Newsha/A/Makooi/Test"?

What I ultimately need is to be able to parse out each individual string 
out of a longer string that has been sent via XML.

I get "Newsha/Makooi/Test"  and I need to parse out "Newsha", "Makooi", 
"Test".  Of course I won't know how many parts the source will yield until 
I count the number of occurrences of "/".

Please advise. 

Thank you. 
Newsha 

  Return to Index