commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject RE: [Jelly] how do I to embed jelly variables and reserved chars in xml
Date Fri, 12 Dec 2003 09:37:44 GMT
Paul Libbrecht wrote on Friday, December 12, 2003 10:23 AM:

> Scott Walters wrote:
>   I also want to embed some javascript in the output but I
> have 2 problems
>> here.
>> First, I haven't been able to figure out how use < or > in an
>> expression, If I put them in as-is, I get parse errors, if I escape
>> them, the javascript doesn't run.
>> Second, I can't get newline characters into the javascript. It all
>> comes out as one big line.  I've tried putting &#13;&#10; after each
>> line, and switching the trim and escapeText options on the
>> <core:file> tag that the html is enclosed in, which I use to put the
>> body text into a jelly variable that the parent tag sends to the
>> servlet output stream. 
> Two little points for your javascript:
> - javascript is not aware of end-of-line (at least the syntax is not)

Sorry, but it is not true. See section 7.9 of ECMA-262 (3rd edition) language specification.

> - a javascript block is a piece of text like others, so
> that... you need
> &lt; &gt; for less-than/greater-then just like in most in-XML codes.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message