Hi, I'm trying to get familiar with XSL and got the following code from the web that replaces a string withing a string with a selected string. Ie. let's says I have firstname.lastname@example.org I would like to replace it with george_REMOVE_AT_mysite.com. So here is the template....
and here is how i try to access it. I can't seem to find the correct way to call it. I get Could not find function: replace-string. The code works if I just display text but it crashes when I try to use the replace-string template.
That depends on what you mean by "display". Normally an XSLT stylesheet produces a result (which can be XML or HTML or text). So by "display" do you mean you want the xsl:call-template element to include something in the result? It doesn't return a value itself, so whatever it is you want included in the result, the template has to do that.
But if you wrap that in an xsl:variable element, then that variable becomes the output destination for the time being. [ April 04, 2007: Message edited by: Paul Clapham ]
Joined: Aug 02, 2006
Thanks for your response it's appreciated. Before I added a template to replace the @ to AT in an email address I had the following wich rendered the html to display Email Address: then the email address.
Here is the code:
Now with the code below my html renders, no errors occur but I only get the label, the actual email with the @ removed doesn't show. Here is the code. Again, thanks for all your help.