Subject: Re: xslt strings: 'substring-between'? From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 2 Aug 2000 10:22:17 +0200 (MET DST) |
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@xxxxxxxxxxxxxxxxxxxxxxx | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: xslt strings: 'substring-betwee, Richard Light | Thread | How to embed HTML in XML, Amit Aggarwal |
RE: more on XSLT processor performa, Kay Michael | Date | like HTML, SAUREL Eric |
Month |