[FMPP] Re: Freemarker 2.3.3 release, Java 1.5
Brought to you by:
ddekany
|
From: Tilman S. <til...@gm...> - 2005-06-29 12:06:52
|
I realize, this is not a FMPP topic but since we are in
the middle of it already I just hope nobody minds
discussing it a bit further.
[snip]
> The reason for not using XML syntax is that it would be very verbose.
> Like, compare:
>
> <#if x>...</#if>
>
> <fm:if test="${x}">...</fm:if>
Why not <fm:if test="x">... ? Agreed, it is more verbose, but
you gain a lot since you could use all XML tools then as well on
FTL files. A normal XML parser would suffice for example, no need
for a special FTP parser.
I use jedit 4.2. It has a freemarker mode built-in, but
this mode does not support code folding, also matching open-close
pairs (<#list>...</#list>) are not indicated. I assume,
this is because freemarker has no strict matching pair
requirements as well-formed XML (e.g. <#include>).
>
> Also note that certain tasks can't be solved easily with keeping the
> document well-formed XML, like try to do these:
>
> <p<#if forceAlignment> align="left"</#if>>...</p>
See xslt:attribute
> <${elementName}>...</${elementName}>
See xslt:element
> Of course some special construct could be introduced for that (like in
> XSLT), but then FTL wouldn't be a general purpose text generator,
> because it had to parse the static-text parts too as XML.
Maybe what is really needed for XML processing is a XML compatible
extension of FTL (some kind of XFTL). :)
> Or what do you mean with "XML compliance" and why do you need that?
I'm using it already - for me it is no show stopper. I just think for
certain applications, it would be easier to deal with, similar
to why XHTML came along replacing HTML sites more and more.
You can now use existing validating XML parsers for example, etc.
[snip]
Regards
Tilman
|