[Yanel-dev] using < > or & in imbedded javascript inside a XSL

basZero baszero at gmail.com
Fri Jul 1 07:36:22 CEST 2011


Hi michael,
I will try that out, thanks! I have tried something similar yesterday with
the CDATA, but let me verify that.

external js file: yes, that's the standard, but I had a huge jQuery function
used for admins only so I did not want to enlarge the regular js file (and
for performance reasons also not create yet another referended file), so I
wanted to include the function directly into the XSL where it is needed.

Cheers
Balz

On Thu, Jun 30, 2011 at 11:51 PM, Michael Wechner <michael.wechner at wyona.com
> wrote:

> **
> Hi Balz
>
> Have you tried
>
> <xsl:comment><![CDATA[
> ....
> ]]></xsl:comment></script>
>
> and inside the CDATA you should be able to use <,>,& etc.
>
> Also what about including the Javascript via link, e.g.
>
> <script type="text/javascript" src="{$yarep.back2realm}js/jquery.js" />
>
> ?
>
> HTH
>
> Michael
>
>
> hi,
>
>  does anybody know how to use <, > or & in a javascript section inside an
> XSL?
> - the mimetype of the resource output is set to text/html
> - I tried multiple things:
>
>  <xsl:value-of select="'<'"/>
>  <xsl:value-of select="'<'"/>
> <xsl:value-of select="'<'" disable-output-escaping="yes" />
>
>  In the resulting HTML, it always renders < which is wrong in case for
> the javascript.
>
>  Any ideas?
>
>  Thanks
> Cheers
> Balz
>
>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20110701/95f7e32a/attachment.html>


More information about the Yanel-development mailing list