From: "Wannheden, Knut" <[EMAIL PROTECTED]>
> Hi,
>
> I was surprised when I noticed that the following two scipts snippets
don't
> produce the same result:
>
> <foo/>
>
> and:
>
> <j:set var="bar">
> <foo/>
> </j:set>
> ${bar}
>
> The first one produces something like "<foo></foo>" whereas the second
> produces something like "<foo></foo>". I'm sure there's a
good
> reason for this I can't seem to think of... can someone explain it to me?
> Also, is there another way to achieve what I'm trying to do?
This is kinda non intuitive. I think we should probably fix it.
Basically when XML is output as text it can be encoded into a valid XML
string or left as is. So tags like <j:set> allow XML encoding to be turned
on or off.
<j:set var="bar" encoding="false">
<foo/>
<j:set>
For some reason the default is to encode as XML text (I can't remember why
this is so). This is probably not a good thing; encoding should probably be
disabled by default. For now you can just specify the default encoding
true/false.
James
-------
http://radio.weblogs.com/0112098/
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]