cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: [c3] Implementing presentation logic in c3
Date Fri, 28 Oct 2011 10:17:03 GMT
On Fri, 2011-10-28 at 11:31 +0200, Francesco Chicchiriccò wrote:
> On 28/10/2011 11:17, Thorsten Scherler wrote:
> >...
> <root>
> <a alt="$parameter$" href="$if(!booleanParameter)$
> expression evaluated to true
> $else$
> expression evaluated to false
> $endif$">link</a>
> </root>
> while this does not:
> <root>
> $if(!booleanParameter)$
> <element>expression evaluated to true</element>
> $else$
> <element>expression evaluated to false</element>
> $endif$
> </root>
> As an alternative to my patch's approach, StringTemplateTransformer 
> could act in a way similar to StringTemplateGenerator's, i.e. buffering 
> the whole input document and passing it as a whole to ST: what do you think?

I guess you implemented the first form as proof of concept since I would
need the second form, but I will have now a try with your patch.

In JX the transformer had been just a wrapper for the generator. That
worked out pretty well. Could the StringTemplateTransformer not just
wrapping the generator? 

The problem with buffering is that it works well under normal
circumstances but blow up on a 3 gb file. Anyway I am still pretty
ignorant of StringTemplateGeneratorTransformer, but are things like 
$link(url="", title="USF's website")$ working in c3?

Thorsten Scherler <>
codeBusters S.L. - web based systems
<consulting, training and solutions>

View raw message