|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: Javascript quote escaping xx = (' ... \' ... '
I've been trying to figure out a way to do this too by just using the
translate() function, but it doesn't work out for me. What I would
like to do is be able to simply go
var x = '<xsl:value-of select="translate($mystring, '\'', '\\\'')" />';
Or something similar -- the idea being that you would do it in just
one line. My current solution is a template that is ugly to call. Any
ideas anyone? I think the only way is to write a long template, which
kinda [expletive deleted] if you want to avoid using one for such a simple
transformation.
On 6/1/05, Bovy, Stephen J <STEPHEN.Bovy@xxxxxx> wrote:
> I need to imbed some xsl ouput within a
> JavaScript string literal assignment statement, for example:
>
> txt += '<xsl:value-of select="." />'
>
> Is there a way to configure my xsl style sheet to automatically
>
> convert single quote occurances to javascript escape format :
>
> (') to --> (\') ???????
>
>
--
Maciej Adwent (maciekadwent@xxxxxxxxx)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








