> - And the most important for the last... how do you call a macro with
> body (like <my:stuff>...</my:stuff> in JSP) with this syntax? I know,
> Vel. doesn't support it anyway, except for some built-in directives,
> but many template language will definitely want to (like JSP,
> FreeMarker, Viento), for good reason IMO. Now I don't go into the
> endless variations of solutions that I tried "on paper" and then
> thrown away, because they had too many catches, or was too verbose, or
> look far too alien. Can anybody show me a good solution with more-less
> WebMacro (Velocity) style? (And don't forget to count with the text
> editors, for which a syntax highlight should be possible.)


Have you looked at the way Viento
handles<http://opensails.org/sails/wiki/VientoBlocksAndStuff>them?
Obviously, we're still working through the escaping implications. In
HTML it's not a big deal, but we're also using it to generate Java code, so
we'll need an easy way to escape } in blocks. Since artists aren't likely to
be generating Java code, I don't think it'll cause many problems in general
use.

There's been some discussion about changing out delimiters at runtime. I'm
fairly new to JavaCC, but is this an easy thing to do? The generated token
manager works off a bunch of static characters (often in switch statements).
The desired behavior would seem to require a major refactoring of the
generated code. Before I started working on Viento, I wanted to be able to
do just that, but once I got my head around JavaCC, it didn't seem
worthwhile. Any help?

Austin

Reply via email to