[Yanel-dev] using < > or & in imbedded javascript inside a XSL
basZero
baszero at gmail.com
Fri Jul 1 08:37:28 CEST 2011
Hi Michael,
many thanks!! it works.
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
> 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/a548b0fc/attachment.html>
More information about the Yanel-development
mailing list