You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2011/07/01 10:25:09 UTC

[C3] Passing parameters from sitemap to generator

Hi all,
recently I have been in the situation for which I need to parametrize an 
XML file of my application; I thought there was a simpler way but I 
ended up by using an additional XSLT transformation step (since the 
XSLTTransformer can accep parameters from the pipeline).

With C2.1 I used to put in place the JXGenerator [1] (or JXTransformer 
[2] depending on the case): this saved me, in many cases, from an 
additional transformation step in the pipeline.

Even though it is true that everything you could do with JXGenerator can 
always be done with XMLGenerator + XSLTTransformer, do you think that 
such component can be a "nice to have" in C3?

Cheers.

[1] http://cocoon.apache.org/2.1/userdocs/jx-generator.html
[2] http://cocoon.apache.org/2.1/userdocs/jx-template-transformer.html

-- 
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/


Re: [C3] Passing parameters from sitemap to generator

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 01/07/2011 11:34, Jos Snellings wrote:
> Hi,
>
> Maybe the Generator is sufficient?
> To pass parameters from the sitemap is not it is not a big deal.
> What sort of parameters do you want? Parts of the path?
>
> controlStuff{tat}/{tit}/{tot}

This was exactly my scenario: I am writing a (kind of) JCR generator 
that reads from a Jackrabbit repository depending on (sub) request path.

> request parameters?

This could also be the case.

> Kind regards,
> Jos
>
> On 07/01/2011 10:33 AM, Thomas Markus wrote:
>> Hi,
>>
>> JXGenerator is really useful, its a must have for me.
>>
>> Thomas
>>
>> Am 01.07.2011 10:25, schrieb Francesco Chicchiriccò:
>>> Hi all,
>>> recently I have been in the situation for which I need to 
>>> parametrize an XML file of my application; I thought there was a 
>>> simpler way but I ended up by using an additional XSLT 
>>> transformation step (since the XSLTTransformer can accep parameters 
>>> from the pipeline).
>>>
>>> With C2.1 I used to put in place the JXGenerator [1] (or 
>>> JXTransformer [2] depending on the case): this saved me, in many 
>>> cases, from an additional transformation step in the pipeline.
>>>
>>> Even though it is true that everything you could do with JXGenerator 
>>> can always be done with XMLGenerator + XSLTTransformer, do you think 
>>> that such component can be a "nice to have" in C3?
>>>
>>> Cheers.
>>>
>>> [1] http://cocoon.apache.org/2.1/userdocs/jx-generator.html
>>> [2] http://cocoon.apache.org/2.1/userdocs/jx-template-transformer.html
-- 
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/


Re: [C3] Passing parameters from sitemap to generator

Posted by Jos Snellings <Jo...@pandora.be>.
Hi,

Maybe the Generator is sufficient?
To pass parameters from the sitemap is not it is not a big deal.
What sort of parameters do you want? Parts of the path?

controlStuff{tat}/{tit}/{tot}
request parameters?

Kind regards,
Jos

On 07/01/2011 10:33 AM, Thomas Markus wrote:
> Hi,
>
> JXGenerator is really useful, its a must have for me.
>
> Thomas
>
> Am 01.07.2011 10:25, schrieb Francesco Chicchiriccò:
>> Hi all,
>> recently I have been in the situation for which I need to parametrize 
>> an XML file of my application; I thought there was a simpler way but 
>> I ended up by using an additional XSLT transformation step (since the 
>> XSLTTransformer can accep parameters from the pipeline).
>>
>> With C2.1 I used to put in place the JXGenerator [1] (or 
>> JXTransformer [2] depending on the case): this saved me, in many 
>> cases, from an additional transformation step in the pipeline.
>>
>> Even though it is true that everything you could do with JXGenerator 
>> can always be done with XMLGenerator + XSLTTransformer, do you think 
>> that such component can be a "nice to have" in C3?
>>
>> Cheers.
>>
>> [1] http://cocoon.apache.org/2.1/userdocs/jx-generator.html
>> [2] http://cocoon.apache.org/2.1/userdocs/jx-template-transformer.html
>>
>
>


Re: [C3] Passing parameters from sitemap to generator

Posted by Thomas Markus <t....@proventis.net>.
Hi,

JXGenerator is really useful, its a must have for me.

Thomas

Am 01.07.2011 10:25, schrieb Francesco Chicchiriccò:
> Hi all,
> recently I have been in the situation for which I need to parametrize 
> an XML file of my application; I thought there was a simpler way but I 
> ended up by using an additional XSLT transformation step (since the 
> XSLTTransformer can accep parameters from the pipeline).
>
> With C2.1 I used to put in place the JXGenerator [1] (or JXTransformer 
> [2] depending on the case): this saved me, in many cases, from an 
> additional transformation step in the pipeline.
>
> Even though it is true that everything you could do with JXGenerator 
> can always be done with XMLGenerator + XSLTTransformer, do you think 
> that such component can be a "nice to have" in C3?
>
> Cheers.
>
> [1] http://cocoon.apache.org/2.1/userdocs/jx-generator.html
> [2] http://cocoon.apache.org/2.1/userdocs/jx-template-transformer.html
>


Re: [C3] Passing parameters from sitemap to generator

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 01/07/2011 11:40, Francesco Chicchiriccò wrote:
> On 01/07/2011 11:29, Reinhard Pötz wrote:
>> On 07/01/2011 10:25 AM, Francesco Chicchiriccò wrote:
>>> Hi all,
>>> recently I have been in the situation for which I need to 
>>> parametrize an XML file of my application; I thought there was a 
>>> simpler way but I ended up by using an additional XSLT 
>>> transformation step (since the XSLTTransformer can accep parameters 
>>> from the pipeline).
>>>
>>> With C2.1 I used to put in place the JXGenerator [1] (or 
>>> JXTransformer [2] depending on the case): this saved me, in many 
>>> cases, from an additional transformation step in the pipeline.
>>>
>>> Even though it is true that everything you could do with JXGenerator 
>>> can always be done with XMLGenerator + XSLTTransformer, do you think 
>>> that such component can be a "nice to have" in C3?
>>
>> So far there is only the StringTemplateGenerator component, that 
>> dynamically generates XML based on a template.
>
> How long should it be to add sitemap parameter handling there?
>
>> There are also no 'build-in' objects like request, session, etc. 
>> which were supported by the JXGenerator or the VelocityGenerator in 
>> Cocoon 2.x
>>
>> I have no strong opinion on what should be migrated to C3 as long as 
>> it goes into a new module or the cocoon-optional module ;-)
>
> Eh eh, I knew that :-)
>
>> I suggest that you choose that technology that fits your requirements 
>> and your time constraints (VelocityGenerator should be rather 
>> straight forward, migrating JX* is definitly more-timeconsuming) best.
>
> As far as the "sitemap parameter handling" part is viable, the 
> VelocityGenerator could be fine.

After taking a closer look to cocoon-stringtemplate, I ended up by doing 
some adjustments to the previous implementation, updating to latest 
StringTemplate available to maven and adding, besides the 
StringTemplateGenerator, a StringTemplateTransformer.

I have also updated cocoon-sample so that it should be straightforward 
to check these two components running.

In this way, we (well, at least I) have something that should cover the 
principal use cases of JX* or VelocityGenerator.

Cheers.

-- 
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/


Re: [C3] Passing parameters from sitemap to generator

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 01/07/2011 11:29, Reinhard Pötz wrote:
> On 07/01/2011 10:25 AM, Francesco Chicchiriccò wrote:
>> Hi all,
>> recently I have been in the situation for which I need to parametrize an
>> XML file of my application; I thought there was a simpler way but I
>> ended up by using an additional XSLT transformation step (since the
>> XSLTTransformer can accep parameters from the pipeline).
>>
>> With C2.1 I used to put in place the JXGenerator [1] (or JXTransformer
>> [2] depending on the case): this saved me, in many cases, from an
>> additional transformation step in the pipeline.
>>
>> Even though it is true that everything you could do with JXGenerator can
>> always be done with XMLGenerator + XSLTTransformer, do you think that
>> such component can be a "nice to have" in C3?
>
> So far there is only the StringTemplateGenerator component, that 
> dynamically generates XML based on a template.

How long should it be to add sitemap parameter handling there?

> There are also no 'build-in' objects like request, session, etc. which 
> were supported by the JXGenerator or the VelocityGenerator in Cocoon 2.x
>
> I have no strong opinion on what should be migrated to C3 as long as 
> it goes into a new module or the cocoon-optional module ;-)

Eh eh, I knew that :-)

> I suggest that you choose that technology that fits your requirements 
> and your time constraints (VelocityGenerator should be rather straight 
> forward, migrating JX* is definitly more-timeconsuming) best.

As far as the "sitemap parameter handling" part is viable, the 
VelocityGenerator could be fine.

Cheers.

-- 
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/


Re: [C3] Passing parameters from sitemap to generator

Posted by Reinhard Pötz <re...@apache.org>.
On 07/01/2011 10:25 AM, Francesco Chicchiriccò wrote:
> Hi all,
> recently I have been in the situation for which I need to parametrize an
> XML file of my application; I thought there was a simpler way but I
> ended up by using an additional XSLT transformation step (since the
> XSLTTransformer can accep parameters from the pipeline).
>
> With C2.1 I used to put in place the JXGenerator [1] (or JXTransformer
> [2] depending on the case): this saved me, in many cases, from an
> additional transformation step in the pipeline.
>
> Even though it is true that everything you could do with JXGenerator can
> always be done with XMLGenerator + XSLTTransformer, do you think that
> such component can be a "nice to have" in C3?

So far there is only the StringTemplateGenerator component, that 
dynamically generates XML based on a template.

There are also no 'build-in' objects like request, session, etc. which 
were supported by the JXGenerator or the VelocityGenerator in Cocoon 2.x

I have no strong opinion on what should be migrated to C3 as long as it 
goes into a new module or the cocoon-optional module ;-)
I suggest that you choose that technology that fits your requirements 
and your time constraints (VelocityGenerator should be rather straight 
forward, migrating JX* is definitly more-timeconsuming) best.

-- 
Reinhard Pötz         Founder & Managing Director, Indoqa and Deepsearch
                         http://www.indoqa.com/people/reinhard-poetz.html

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard@apache.org
________________________________________________________________________

       Furthermore, I think Oracle has to honor the JSPA agreement.
     http://s.apache.org/JCPIsDead       http://s.apache.org/tck-trap