Re: request for widget library status report

Emiliano Heyns <[email protected]> Sun, 20 Apr 2003 15:59:04 +0200
Newsgroups gmane.comp.java.xwt.general
Message-ID <[email protected]>
Andrew Kohlsmith wrote:

>><xwt>
>>   <template>
>>   <[CDATA[
>>
>>var myvar = function(a, b) { if (a && b) return "seven";}
>>
>>   ]]>
>>    <box id="box1"/>
>>    <box id="box1"/>
>>   </template>
>></xwt>
> 
> 
> Excuse me while I vomit...

You don't *have* to use CDATA sections. Having them does not make the 
existing way of doing things (inluding the 'and' hack) unavailable.

> Hell, why not just declare <template> a de-facto alias for CDATA?  I would 
> think that would be by far the most straightforward and idiot-proof way of 
> doing things.

If you do that, you'll never see the boxes embedded in the template. The 
<box id="box1"/> would be read as were it &lt;box id="box1"/&gt;. That's 
what CDATA does.

CDATA has other problems, though. For example, you can't have ']]>' in 
the text anywhere. Which looks trivial until you find out that 
hard-to-find error traces back to
   if(idmap[keys[id]]>5) {....}
Been there, done that.

Emile


_______________________________________________
http://lists.xwt.org/listinfo/dev