This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: xslt strings: 'substring-between'?


Steve,

> I want to be able to parse an url string, and return name value pairs:
> page.cgi?T=boston&S=MA
> I can test if the T parameter exists and has a value (not equal to &),
> but, how do I extract the contents between the = and the next &?
> e.g. "boston"?
> What if there isn't a trailing & on the parameter (the last parameter
> in the url, such as S=MA above)? 
[...]
> Has anyone assembled a list of string utility functions? I've seen a 
> few in the XSLT Programmers reference, but none which will do what I
> want above.

All available string functions are defined in the XPath Spec, see
http://www.w3.org/TR/xpath#section-String-Functions

I think to achieve what you want you have to combine these functions
in a proper way (i.e. call substring-after(substring-before(....)) ).

Regards,
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]