RE: Template note updated

> Alex Milowski <alex@milowski.org> writes:
> > I don't see why this makes things easier.  That's like saying since
> > "&" has to be escaped in XML and we use ";" to end entity
references,
> > a ";" needs to be escaped.
> >
> > I would prefer it to not be an error unless we find some *really*
good reason.
> 
> So if I want to include "{some content}" literally in my template, I
> have to generate
> 
>   <script>function f() {{some content}</script>
> 
> rather than
> 
>   <script>function f() {{some content}}</script>

I didn't mean that you have to use }, I meant that if the parser sees a
stray '}' in the regular mode, it does not report an error but treats it
as a literal '}' character, like it was '}}'.
So both examples above would produce the same result.

> 
> And if I do use the second form, I'll get:
> 
>   <script>function f() {some content}}</script>
> 
> in the output.

No, that is a wrong interpretation. See above.

Vojtech

--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech

Received on Monday, 22 November 2010 08:30:43 UTC