Re: [Freemarker-devel] Ideal tag syntax; what's your take on it?
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user,gmane.comp.web.freemarker.devel |
|---|---|
| Message-ID | <[email protected]> |
Friday, June 10, 2011, 1:49:13 PM, Daniel Henrique Alves Lima wrote:
[snip]
>> [#foo :]
>> ...
>> [#.]
>>
>> or [#. foo], optionally.
>>
>>
>
> How about
>
> #foo [aaaaaaa
> aaaaa#if condition [aaaaa
> aaaa
> ]aaaa
> ]aaaa
>
> Or perhaps as cryptic as Velocity (sometimes).
You are marching towards the WebMacro-ish syntax here. My main problem
with them is that "]" (or "}", the more usual choice) isn't very much
visible in the middle of the static text. Where that's not a problem,
WebMacro-ish syntaxes rock though (and here see my comment regarding
multiple syntaxes). The fact that a mere "]" has special meaning also
complicates matters. In WebMacro (where it was "}", not "]") it did
cause headaches. That problem can be handled well if you do allow "]"
in static text as far as it has a "[" pair in static text, in which
case the parser understands that the "[" and "]" are just static text.
Of course it raises the need for vertical-flow-statements (my term for
it...) like:
#vIf condition [
[ <- static, not printed if condition is flase
#vEndIf [
static, always printed
]
] <- static, not printed if condition is flase
]
but those are handy even if you have no syntactical problems, so
that's not a problem in itself.
--
Best regards,
Daniel Dekany
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev