Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - replace substring [Thread Next] Re: replace substringTo: NULL Date: 5/9/2007 6:13:00 PM Read about the XPath functions contains(), substring-before() and substring-after(). In XSLT 1.0 it would be necessary to use a recursively called named template. In XPath 2.0 one can use the standard function replace() http://www.w3.org/TR/xpath-functions/#func-replace Cheers, Dimitre Novatchev "Erik Stelzer" <erik.stelzer@g...> wrote in message news:e1iOa8lkHHA.960@T...... > Hi ng, > > could you please help me with the following problem: > > In a given string I would like to replace the first (and also all) > occurrences of a certain substring with another substring. The function > 'translate()' only searches for single characters and hence is not > applicable to my case. > As an example: I would like to replace "~/protected" with "" in > "~/protected/subdir/test.html" so that I get "subdir/test.html" in the > end. Any help is truly appreciated! > > Cheers, > Erik | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
