cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: jxtemplate output garbles markup
Date Fri, 15 Oct 2004 19:21:25 GMT
Jorg Heymans wrote:
> 
> 
> Vadim Gritsenko wrote:
> 
>> Jorg Heymans wrote:
>>
>>> Hi,
>>>
>>> This has come up a few times before without solution.
>>>
>>> <jx:out value="{$mybean.data}"/> produces "&lt;test/&gt;" if data

>>> contains "<test/>".
>>> Using {$mybean.data} yields the same results.
>>>
>>> Is there a way around this?
>>
>>
>>
>> It seems to be correct behavior - as long as "mybean.data" is a String 
>> object. Now, it would be wrong if "data" is instane of XMLizable, or 
>> XMLFragment, or DOM Node.
> 
> 
> fair enough, is this because one could produce invalid xml data otherwise?

Historically, it works same way everywhere in Cocoon. If you remember XSP, you 
understand what I mean :)

I guess this behaviour causes user confusion because comparing with plain JSP, 
PHP, ASP, etc, Cocoon is (so to speak) "strongly typed": String is *always* a 
String, even if it looks like XML snippet :) To make it real XML, you have to 
parse it.

Vadim

Mime
View raw message