Robert Koberg wrote:
Jonathan Revusky wrote:

But really, why do you feel a need for a raw template to be well formed XML? Isn't it the output that matters? If you were using FreeMarker or Velocity to generate a Java source file, would you expect the raw template to be compilable java code? (If it were, that would be quite surprising.)


let me expand on my previous email with a brief example.

Lets say I have a content management system that puts XML content pieces into page regions. One of those content pieces has some links that should only be available to certain users at runtime:

<list-o-links>
 <link>everyone can see</link>
 #if ($isWhatever)
   <link>whatever can see</link>
 #end
</list-o-links>

This is transformed to, say, (X)HTML by XSL for a run against the velocity engine at runtime.


Yes, I understand now. You're chaining XSL->Vel->Final output. This same disposition can be used easily with the latest, greatest FM version, because rather than:

<#if isWhatever>...</#if>

you can use a syntax of:

[#if isWhatever]...[/#if]

which is just as XML-friendly as the Velocity syntax.

However, you might also consider that you can do the full transformation with FreeMarker.

Jonathan Revusky
--
lead developer, FreeMarker project http://freemarker.org
Velocity-FreeMarker comparison page: http://freemarker.org/fmVsVel.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to