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

Michael Wechner michael.wechner at wyona.com
Fri Jul 1 09:33:24 CEST 2011


Am 01.07.11 08:37, schrieb basZero:
> Hi Michael,
> many thanks!! it works.

excellent :-)
>
> Example:
>
> <script><xsl:comment><![CDATA[
>
>       $(document).ready(function(){
>
>         var a = 2;
>
>         var b = 3;
>
>         if ((b > a) && (3>2)) {
>
>           alert("ok");
>
>         }
>
>       })
>
> ]]></xsl:comment>
>
> </script>
>
>
> Cheers
> Balz
>
> On Thu, Jun 30, 2011 at 11:51 PM, Michael Wechner 
> <michael.wechner at wyona.com <mailto: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
>     <mailto: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/71352559/attachment-0001.html>


More information about the Yanel-development mailing list