[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] ESCAPE SINGLE QUOTES FOR JAVASCRIPT PARAMETER IN XSLT


Subject: Re: [xsl] ESCAPE SINGLE QUOTES FOR JAVASCRIPT PARAMETER IN XSLT
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sat, 07 Jun 2008 13:43:50 +0200

Cleyton Jordan wrote:

I use XSLT 1.0. So the function you provided will not work for me.

Is there any similar trick in XSLT 1.0?

You need to escape the single quote in the JavaScript string literal as \'. With XSLT 1.0 you will have to write a template doing that or make use of EXSLT http://exslt.org/str/functions/replace/index.html or a similar library.


--

	Martin Honnen
	http://JavaScript.FAQTs.com/


Current Thread
Keywords