You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lars Huttar <la...@sil.org> on 2011/07/11 21:41:03 UTC

Cocoon 3 - no conditional pipelines?

Hi,

As we look at porting one of our applications from Cocoon 2.1 to 3.0,
one thing I saw causes me concern [1]:

> A Cocoon 3 pipeline always goes through the same sequence of
> components to produce its output. There is no support for
> conditionals, loops, tees or alternative flows in the case of errors.
> The reason for this restriction is simplicity and that non-linear
> pipelines are more difficult (or even impossible) to be cached. In
> practice this means that a pipeline has to be contructed completely at
> build-time.
>
> If non-linear XML pipes with runtime-support for conditionals, loops,
> tees and error-flows are a requirement for you, see the XProc
> <http://en.wikipedia.org/wiki/XProc> standard of the W3C. There are
> several available implementations for it.
>

Is this still true, that Cocoon 3 pipelines cannot have conditionals or
error flows? or is that obsolete?
Our application occasionally uses <map:select> and <map:handle-errors>,
so this could be an indication that Cocoon 3 will not meet our needs.

On the other hand, the sitemap at
 
cocoon-all-3.0.0-alpha-3\src\cocoon-sample\src\main\resources\COB-INF\sitemap.xmap
has both <map:select> and <map:handle-errors> in it.

So maybe that sitemap does not represent a sitemap that will work with
Cocoon 3.0? In that case, is there any sample sitemap that will work
with C3? That was the only sample sitemap I had found (except the one
under cocoon-profiling, which has barely anything in it).

Thanks,
Lars

[1] http://cocoon.apache.org//3.0/reference/html-single/index.html#d0e88


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon 3 - no conditional pipelines?

Posted by Lars Huttar <la...@sil.org>.
On 7/12/2011 3:39 AM, Francesco Chicchiriccò wrote:
>
> Lars,
> a brief outlook to the docbook source of the page [1]
>
> svn info 
> http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-docs/src/docbkx/reference/pipelines.xml
>
> states that this document was last modified by Reinhard in January 2010.
>
> I became member of the PMC more than one year afterwards, so I cannot 
> be completely sure. but I can suppose that the documentation is simply 
> outdated since:
>
>  1.  there are no issues on JIRA about marking as deprecated or about
>     removing support for "non-linear" stuff
>  2. the documentation probably refers to the Pipeline (Java) API
>
> Anyway, I do believe that the definitive answer can only come from 
> Reinhard, currently on holiday for a couple of weeks more.
>
> Regards.

> -- Francesco Chicchiriccò Apache Cocoon Committer and PMC Member 
> http://people.apache.org/~ilgrosso/ 

Thanks... this helps.

I will write myself a note to ask again in a couple of weeks.

Regards,
Lars


Re: Cocoon 3 - no conditional pipelines?

Posted by Lars Huttar <la...@sil.org>.
On 7/12/2011 12:09 PM, Steven Dolg wrote:
> Am 12.07.2011 10:39, schrieb Francesco Chicchiriccò:
>> ... I became member of the PMC more than one year afterwards, so I
>> cannot be completely sure. but I can suppose that the documentation
>> is simply outdated since:
>>
>>    1.  there are no issues on JIRA about marking as deprecated or
>>       about removing support for "non-linear" stuff
>>    2. the documentation probably refers to the Pipeline (Java) API
>>
>
> That second point is indeed true.
>
> The Pipeline API itself does not support conditionals, loops or things
> like that.
> A pipeline is constructed, filled with components and then executed.
> That execution will use all the components in the pipeline.
>
> The sitemap on the other constructs pipelines on demand.
> It can and does use conditionals to decide what pipeline to construct
> and which components to add in which order.
>
> If you are used to using a sitemap and intend to stay with that
> approach you should find everything you need.
> You could take a look at the unit tests / samples for the sitemap
> modules to see what is possible and what not.
>
>
> HTH,
> Steven
>

Thanks, that does indeed help.

Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon 3 - no conditional pipelines?

Posted by Steven Dolg <st...@indoqa.com>.
Am 12.07.2011 10:39, schrieb Francesco Chicchiriccò:
> On 11/07/2011 23:25, Lars Huttar wrote:
>> Robby,
>> Thanks for your reply.
>> It's nice to see another instance of the conditional and error-handling
>> sitemap structures.
>>
>> However we still have a contradiction with section 2.1.1 of the
>> documentation [1], and it doesn't seem certain to me which is going to
>> "win".
>>
>> The "linear pipelines" / "no conditionals" statement, AFAIK, is new to
>> Cocoon 3.0. So if indeed C3 is intended to continue to allow and support
>> conditionality in pipelines, then we have to conclude that
>> (a) the "linear pipelines" idea was discussed, and decided upon, and
>> added to the documentation, but
>> (b) then it was rejected, but has not yet been removed from the
>> documentation.
>>
>> If on the other hand section 2.1.1 is correct, then we can assume that
>> (a) the "linear pipelines" idea was discussed, and decided upon, and
>> added to the documentation, but
>> (b) the consequent changes to the Cocoon code and samples have not all
>> been made yet, but will be in the future.
>>
>> It seems to me that the latter is a little more plausible (that a
>> decision has been made but its ramifications have not yet been applied
>> throughout the project) than the former (that a decision was made,
>> documented, and reversed, but not yet de-documented).
>>
>> It would be very helpful to hear a definite statement from a Cocoon
>> committer or PMC member, before implementing an application that relies
>> on conditional pipelines, which may later disappear.
>
> Lars,
> a brief outlook to the docbook source of the page [1]
>
> svn info 
> http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-docs/src/docbkx/reference/pipelines.xml
>
> states that this document was last modified by Reinhard in January 2010.
>
> I became member of the PMC more than one year afterwards, so I cannot 
> be completely sure. but I can suppose that the documentation is simply 
> outdated since:
>
>    1.  there are no issues on JIRA about marking as deprecated or
>       about removing support for "non-linear" stuff
>    2. the documentation probably refers to the Pipeline (Java) API
>

That second point is indeed true.

The Pipeline API itself does not support conditionals, loops or things 
like that.
A pipeline is constructed, filled with components and then executed.
That execution will use all the components in the pipeline.

The sitemap on the other constructs pipelines on demand.
It can and does use conditionals to decide what pipeline to construct 
and which components to add in which order.

If you are used to using a sitemap and intend to stay with that approach 
you should find everything you need.
You could take a look at the unit tests / samples for the sitemap 
modules to see what is possible and what not.


HTH,
Steven


> Anyway, I do believe that the definitive answer can only come from 
> Reinhard, currently on holiday for a couple of weeks more.

Reinhard will be back next week...

>
> Regards.
>
>> [1]http://cocoon.apache.org//3.0/reference/html/pipelines.html#d0e88
>>
>> On 7/11/2011 3:42 PM, Robby Pelssers wrote:
>>> Hi Lars,
>>>
>>> if you take a look at the cocoon-sitemap module you will see all supported nodes:
>>>
>>> - act
>>> - error
>>> - generate
>>> - match
>>> - otherwise
>>> - parameter
>>> - pipeline
>>> - pipelines
>>> - read
>>> - select
>>> - serialize
>>> - sitemap
>>> - transform
>>> - when
>>>
>>> So I think you're good to go with C3.
>>>
>>> Kind regards,
>>> Robby
>>>
>>>
>>> -----Oorspronkelijk bericht-----
>>> Van: Lars Huttar [mailto:lars_huttar@sil.org]
>>> Verzonden: ma 11-7-2011 21:41
>>> Aan: Cocoon Users List
>>> Onderwerp: Cocoon 3 - no conditional pipelines?
>>>
>>> Hi,
>>>
>>> As we look at porting one of our applications from Cocoon 2.1 to 3.0,
>>> one thing I saw causes me concern [1]:
>>>
>>>> A Cocoon 3 pipeline always goes through the same sequence of
>>>> components to produce its output. There is no support for
>>>> conditionals, loops, tees or alternative flows in the case of errors.
>>>> The reason for this restriction is simplicity and that non-linear
>>>> pipelines are more difficult (or even impossible) to be cached. In
>>>> practice this means that a pipeline has to be contructed completely at
>>>> build-time.
>>>>
>>>> If non-linear XML pipes with runtime-support for conditionals, loops,
>>>> tees and error-flows are a requirement for you, see the XProc
>>>> <http://en.wikipedia.org/wiki/XProc>  standard of the W3C. There are
>>>> several available implementations for it.
>>>>
>>> Is this still true, that Cocoon 3 pipelines cannot have conditionals or
>>> error flows? or is that obsolete?
>>> Our application occasionally uses<map:select>  and<map:handle-errors>,
>>> so this could be an indication that Cocoon 3 will not meet our needs.
>>>
>>> On the other hand, the sitemap at
>>>
>>> cocoon-all-3.0.0-alpha-3\src\cocoon-sample\src\main\resources\COB-INF\sitemap.xmap
>>> has both<map:select>  and<map:handle-errors>  in it.
>>>
>>> So maybe that sitemap does not represent a sitemap that will work with
>>> Cocoon 3.0? In that case, is there any sample sitemap that will work
>>> with C3? That was the only sample sitemap I had found (except the one
>>> under cocoon-profiling, which has barely anything in it).
>>>
>>> Thanks,
>>> Lars
>>>
>>> [1]http://cocoon.apache.org//3.0/reference/html-single/index.html#d0e88
> -- 
> Francesco Chicchiriccò
>
> Apache Cocoon Committer and PMC Member
> http://people.apache.org/~ilgrosso/


Re: Cocoon 3 - no conditional pipelines?

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 11/07/2011 23:25, Lars Huttar wrote:
> Robby,
> Thanks for your reply.
> It's nice to see another instance of the conditional and error-handling
> sitemap structures.
>
> However we still have a contradiction with section 2.1.1 of the
> documentation [1], and it doesn't seem certain to me which is going to
> "win".
>
> The "linear pipelines" / "no conditionals" statement, AFAIK, is new to
> Cocoon 3.0. So if indeed C3 is intended to continue to allow and support
> conditionality in pipelines, then we have to conclude that
> (a) the "linear pipelines" idea was discussed, and decided upon, and
> added to the documentation, but
> (b) then it was rejected, but has not yet been removed from the
> documentation.
>
> If on the other hand section 2.1.1 is correct, then we can assume that
> (a) the "linear pipelines" idea was discussed, and decided upon, and
> added to the documentation, but
> (b) the consequent changes to the Cocoon code and samples have not all
> been made yet, but will be in the future.
>
> It seems to me that the latter is a little more plausible (that a
> decision has been made but its ramifications have not yet been applied
> throughout the project) than the former (that a decision was made,
> documented, and reversed, but not yet de-documented).
>
> It would be very helpful to hear a definite statement from a Cocoon
> committer or PMC member, before implementing an application that relies
> on conditional pipelines, which may later disappear.

Lars,
a brief outlook to the docbook source of the page [1]

svn info 
http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-docs/src/docbkx/reference/pipelines.xml

states that this document was last modified by Reinhard in January 2010.

I became member of the PMC more than one year afterwards, so I cannot be 
completely sure. but I can suppose that the documentation is simply 
outdated since:

   1.   there are no issues on JIRA about marking as deprecated or about
      removing support for "non-linear" stuff
   2. the documentation probably refers to the Pipeline (Java) API

Anyway, I do believe that the definitive answer can only come from 
Reinhard, currently on holiday for a couple of weeks more.

Regards.

> [1] http://cocoon.apache.org//3.0/reference/html/pipelines.html#d0e88
>
> On 7/11/2011 3:42 PM, Robby Pelssers wrote:
>> Hi Lars,
>>
>> if you take a look at the cocoon-sitemap module you will see all supported nodes:
>>
>> - act
>> - error
>> - generate
>> - match
>> - otherwise
>> - parameter
>> - pipeline
>> - pipelines
>> - read
>> - select
>> - serialize
>> - sitemap
>> - transform
>> - when
>>
>> So I think you're good to go with C3.
>>
>> Kind regards,
>> Robby
>>
>>
>> -----Oorspronkelijk bericht-----
>> Van: Lars Huttar [mailto:lars_huttar@sil.org]
>> Verzonden: ma 11-7-2011 21:41
>> Aan: Cocoon Users List
>> Onderwerp: Cocoon 3 - no conditional pipelines?
>>
>> Hi,
>>
>> As we look at porting one of our applications from Cocoon 2.1 to 3.0,
>> one thing I saw causes me concern [1]:
>>
>>> A Cocoon 3 pipeline always goes through the same sequence of
>>> components to produce its output. There is no support for
>>> conditionals, loops, tees or alternative flows in the case of errors.
>>> The reason for this restriction is simplicity and that non-linear
>>> pipelines are more difficult (or even impossible) to be cached. In
>>> practice this means that a pipeline has to be contructed completely at
>>> build-time.
>>>
>>> If non-linear XML pipes with runtime-support for conditionals, loops,
>>> tees and error-flows are a requirement for you, see the XProc
>>> <http://en.wikipedia.org/wiki/XProc>  standard of the W3C. There are
>>> several available implementations for it.
>>>
>> Is this still true, that Cocoon 3 pipelines cannot have conditionals or
>> error flows? or is that obsolete?
>> Our application occasionally uses<map:select>  and<map:handle-errors>,
>> so this could be an indication that Cocoon 3 will not meet our needs.
>>
>> On the other hand, the sitemap at
>>
>> cocoon-all-3.0.0-alpha-3\src\cocoon-sample\src\main\resources\COB-INF\sitemap.xmap
>> has both<map:select>  and<map:handle-errors>  in it.
>>
>> So maybe that sitemap does not represent a sitemap that will work with
>> Cocoon 3.0? In that case, is there any sample sitemap that will work
>> with C3? That was the only sample sitemap I had found (except the one
>> under cocoon-profiling, which has barely anything in it).
>>
>> Thanks,
>> Lars
>>
>> [1] http://cocoon.apache.org//3.0/reference/html-single/index.html#d0e88
-- 
Francesco Chicchiriccò

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


Re: Cocoon 3 - no conditional pipelines?

Posted by Lars Huttar <la...@sil.org>.
Robby,
Thanks for your reply.
It's nice to see another instance of the conditional and error-handling
sitemap structures.

However we still have a contradiction with section 2.1.1 of the
documentation [1], and it doesn't seem certain to me which is going to
"win".

The "linear pipelines" / "no conditionals" statement, AFAIK, is new to
Cocoon 3.0. So if indeed C3 is intended to continue to allow and support
conditionality in pipelines, then we have to conclude that
(a) the "linear pipelines" idea was discussed, and decided upon, and
added to the documentation, but
(b) then it was rejected, but has not yet been removed from the
documentation.

If on the other hand section 2.1.1 is correct, then we can assume that
(a) the "linear pipelines" idea was discussed, and decided upon, and
added to the documentation, but
(b) the consequent changes to the Cocoon code and samples have not all
been made yet, but will be in the future.

It seems to me that the latter is a little more plausible (that a
decision has been made but its ramifications have not yet been applied
throughout the project) than the former (that a decision was made,
documented, and reversed, but not yet de-documented).

It would be very helpful to hear a definite statement from a Cocoon
committer or PMC member, before implementing an application that relies
on conditional pipelines, which may later disappear.

Regards,
Lars

[1] http://cocoon.apache.org//3.0/reference/html/pipelines.html#d0e88

On 7/11/2011 3:42 PM, Robby Pelssers wrote:
> Hi Lars,
>
> if you take a look at the cocoon-sitemap module you will see all supported nodes:
>
> - act
> - error
> - generate
> - match
> - otherwise
> - parameter
> - pipeline
> - pipelines
> - read
> - select
> - serialize
> - sitemap
> - transform
> - when
>
> So I think you're good to go with C3.
>
> Kind regards,
> Robby
>
>
> -----Oorspronkelijk bericht-----
> Van: Lars Huttar [mailto:lars_huttar@sil.org]
> Verzonden: ma 11-7-2011 21:41
> Aan: Cocoon Users List
> Onderwerp: Cocoon 3 - no conditional pipelines?
>  
> Hi,
>
> As we look at porting one of our applications from Cocoon 2.1 to 3.0,
> one thing I saw causes me concern [1]:
>
>> A Cocoon 3 pipeline always goes through the same sequence of
>> components to produce its output. There is no support for
>> conditionals, loops, tees or alternative flows in the case of errors.
>> The reason for this restriction is simplicity and that non-linear
>> pipelines are more difficult (or even impossible) to be cached. In
>> practice this means that a pipeline has to be contructed completely at
>> build-time.
>>
>> If non-linear XML pipes with runtime-support for conditionals, loops,
>> tees and error-flows are a requirement for you, see the XProc
>> <http://en.wikipedia.org/wiki/XProc> standard of the W3C. There are
>> several available implementations for it.
>>
> Is this still true, that Cocoon 3 pipelines cannot have conditionals or
> error flows? or is that obsolete?
> Our application occasionally uses <map:select> and <map:handle-errors>,
> so this could be an indication that Cocoon 3 will not meet our needs.
>
> On the other hand, the sitemap at
>  
> cocoon-all-3.0.0-alpha-3\src\cocoon-sample\src\main\resources\COB-INF\sitemap.xmap
> has both <map:select> and <map:handle-errors> in it.
>
> So maybe that sitemap does not represent a sitemap that will work with
> Cocoon 3.0? In that case, is there any sample sitemap that will work
> with C3? That was the only sample sitemap I had found (except the one
> under cocoon-profiling, which has barely anything in it).
>
> Thanks,
> Lars
>
> [1] http://cocoon.apache.org//3.0/reference/html-single/index.html#d0e88
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Cocoon 3 - no conditional pipelines?

Posted by Robby Pelssers <ro...@ciber.com>.
Hi Lars,

if you take a look at the cocoon-sitemap module you will see all supported nodes:

- act
- error
- generate
- match
- otherwise
- parameter
- pipeline
- pipelines
- read
- select
- serialize
- sitemap
- transform
- when

So I think you're good to go with C3.

Kind regards,
Robby


-----Oorspronkelijk bericht-----
Van: Lars Huttar [mailto:lars_huttar@sil.org]
Verzonden: ma 11-7-2011 21:41
Aan: Cocoon Users List
Onderwerp: Cocoon 3 - no conditional pipelines?
 
Hi,

As we look at porting one of our applications from Cocoon 2.1 to 3.0,
one thing I saw causes me concern [1]:

> A Cocoon 3 pipeline always goes through the same sequence of
> components to produce its output. There is no support for
> conditionals, loops, tees or alternative flows in the case of errors.
> The reason for this restriction is simplicity and that non-linear
> pipelines are more difficult (or even impossible) to be cached. In
> practice this means that a pipeline has to be contructed completely at
> build-time.
>
> If non-linear XML pipes with runtime-support for conditionals, loops,
> tees and error-flows are a requirement for you, see the XProc
> <http://en.wikipedia.org/wiki/XProc> standard of the W3C. There are
> several available implementations for it.
>

Is this still true, that Cocoon 3 pipelines cannot have conditionals or
error flows? or is that obsolete?
Our application occasionally uses <map:select> and <map:handle-errors>,
so this could be an indication that Cocoon 3 will not meet our needs.

On the other hand, the sitemap at
 
cocoon-all-3.0.0-alpha-3\src\cocoon-sample\src\main\resources\COB-INF\sitemap.xmap
has both <map:select> and <map:handle-errors> in it.

So maybe that sitemap does not represent a sitemap that will work with
Cocoon 3.0? In that case, is there any sample sitemap that will work
with C3? That was the only sample sitemap I had found (except the one
under cocoon-profiling, which has barely anything in it).

Thanks,
Lars

[1] http://cocoon.apache.org//3.0/reference/html-single/index.html#d0e88


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org