Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Replacing a string segment inside a variable? >Thread Next - Re: Replacing a string segment inside a variable? Re: Replacing a string segment inside a variable?To: NULL Date: 7/21/2009 6:15:00 PM ChrisG wrote: > Thanks Martin! I did neglect to mention that I'm using xslt 1.0, so > I'm trying the latter part of your answer. >> With XSLT 1.0 there is no replace unless you implement it with a named >> template that you then need to call inside of an xsl:attribute. On the >> other hand for the string you have doing >> <a href="{concat(substring-before(@ows_URL, '/'), >> '/EditForm.aspx')}&Source={$PageUrl}">Click This</a> >> should suffice. I think I just looked at the second description I'd like to change "/DispForm.aspx?" to /EditForm.aspx?" I am afraid with the full description of The link attribute {@ows_URL} has the value "http://mySiteUrl/ DispForm.aspx?ID=6" my code sample does not work as you need it as there are several slashes in that string. So you are probably better off to use a named template that replaces a string and then construct the href attribute with xsl:attribute where you use xsl:call-template inside of the xsl:attribute. -- Martin Honnen --- MVP XML http://msmvps.com/blogs/martin_honnen/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
