Re: [Freemarker-devel] Ideal tag syntax; what's your take on it?

Daniel Henrique Alves Lima <[email protected]>
Newsgroups gmane.comp.web.freemarker.user,gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Hi Daniel.

Daniel Dekany wrote:
> 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.
>   

   Ok.

  I didn't know WebMacro.


> 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.
>
>   

I'm afraid I couldn't understand the example :-(
Is everything inside of #vIf condition [] static text? Or everything 
inside of #vIf condition [[]]?

#vIf condition {static content
    [static 
      #vEndIf [static
        static, always printed
      ]static
    ]static
}


or

#vIf condition [static content
    {static 
      #vEndIf {static
        static, always printed
      }static
    }static
]






#vIf condition [static content
static content
   #vIf otherCondition [static content
   ]static content
] #vElse [static
]



I do like the fact that FreeMarker allows [#ftl] or <#ftl>


------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.