On Thu, 2011-12-15 at 18:27 +0100, Simone Tripodi wrote:
> Hi Grosso!!!
> 
> >
> > Anyway, could you think of a way for using this new component inside
> > sitemap?
> >
> > Thanks.
> >
> 
> ehm... yes, so... I was think about... ehm... yes I know how, yes...
> ehm... don't know yet :P
> 
> jokes a part, what's your usecase using Stringtemplate inside the
> sitemap? We could start replicating the same behavior, just for
> start...
> 
> Thanks for the feedbacks and TIA for the new ones!
> All the best,

Actually Stringtemplate is very limited and lightweight and exists as
well as transformer. However I agree that this new component is a nice
extension to c3.

Regarding the example I would love that this component would work with
the Properties/Module generator I once wrote for forrest 

https://svn.apache.org/repos/asf/forrest/trunk/whiteboard/cocoon-2.2-blocks/propertiesGenerator/src/main/java/org/apache/forrest/generation/ModuleGenerator.java

In a context such as doing an aggregation of source and properties and
then run the transfomer. The only change would be need that we check
whether we have a properties element in the context and if so we can
create the Properties variables = new Properties(); out of the result
from the propertiesGenerator. 

If that is from interest I can migrate the block to c3 and instead of
input modules it would connect the language interpreter modules. This
way it would be easy integrated into the sitemap. 

Another approach would be to use the transformer configure and use a
language interpreter to generate a Properties object. That works since
we can now inject object and not only strings. Like:

<map:transform xmlns:map="http://apache.org/cocoon/sitemap";
type="variableExpanderTransformer">
  <map:parameter name="text"properties value="{properties:something}"/>
</map:transform>

This would allow to use other props beside the "env".

wdyt?
-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/

Reply via email to