You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Reinhard Pötz <re...@apache.org> on 2008/08/15 16:04:39 UTC

[cocoon3] Nested pipelines

Carlos Tejo Alonso wrote:
> Hello,
> 
> I would like to do that:
> 
> input_1 -> transformation_2 -> output_1
> input_2 -> transformation_2 -> output_2
> 
> output_1 + ouput_2 -> transformation -> output_1+2
> 
> What's the way to connect 2 pipelines in corona-pipeline?

Currently nested pipelines are not supported directly but it's on my
wishlist ;-)

For now you could write an InputStreamGenerator (should be very similar
to the StringGenerator) and take the output of the first pipeline as
input for the second. That's not optimal solution in terms of
performance but simple to implement.

HTH

-- 
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

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

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


RE: [cocoon3] Nested pipelines

Posted by Philip Fennell <Ph...@bbc.co.uk>.
Hello Slav,

> well, can i wish support of dynamic XSLT generation in addition?


I use Schematron with Cocoon by setting-up the following map:match that generates the compiled Schematron schema:

<!-- Compiles the matching Schematron Schema into XSLT. -->
<map:match pattern="test/validators/*.xsl">
    <map:generate type="file" src="test/schema/{1}.sch"/>
    <map:transform type="xslt" src="test/transforms/iso_dsdl_include.xsl"/>
    <map:transform type="xslt" src="test/transforms/iso_abstract_expand.xsl"/>
    <map:transform type="xslt2" src="test/transforms/iso_svrl-x.xsl"/>
    <map:serialize type="xml"/>
</map:match>


Then I add the following transform to the pipeline that carries-out the validation:

<map:transform type="xslt" src="cocoon:/test/validators/{1}.xsl"/>

The input to the pipeline will be the document you wish to test, the wildcard in the transformer src is the name of the schema you wish to use. The schema name could also be passed in via a request parameter and set using {request-param:schema}.



Regards

Philip Fennell
>XSLT Developer (Content Management Culture)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP 
>BC4 C4, Broadcast Centre
>
>T:	0208 0085318
>

-----Original Message-----
From: Vyacheslav Sedov [mailto:vyacheslav.sedov@gmail.com] 
Sent: 18 August 2008 07:41
To: users@cocoon.apache.org
Subject: Re: [cocoon3] Nested pipelines

well, can i wish support of dynamic XSLT generation in addition?

stage1 - xml1 -> xslt1 -> xslt2
stage2 - xml2 -> xslt2 -> result-xml

as simplest example - Schematron rules

with best wishes,
Slav

On Fri, Aug 15, 2008 at 6:04 PM, Reinhard Pötz <re...@apache.org> wrote:
> Carlos Tejo Alonso wrote:
>> Hello,
>>
>> I would like to do that:
>>
>> input_1 -> transformation_2 -> output_1
>> input_2 -> transformation_2 -> output_2
>>
>> output_1 + ouput_2 -> transformation -> output_1+2
>>
>> What's the way to connect 2 pipelines in corona-pipeline?
>
> Currently nested pipelines are not supported directly but it's on my 
> wishlist ;-)
>
> For now you could write an InputStreamGenerator (should be very 
> similar to the StringGenerator) and take the output of the first 
> pipeline as input for the second. That's not optimal solution in terms 
> of performance but simple to implement.
>
> HTH
>
> --
> Reinhard Pötz                           Managing Director, {Indoqa} GmbH
>                         
> http://www.indoqa.com/en/people/reinhard.poetz/
>
> Member of the Apache Software Foundation
> Apache Cocoon Committer, PMC member                  reinhard@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


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

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


Re: [cocoon3] Nested pipelines

Posted by Reinhard Pötz <re...@apache.org>.
Rainer Pruy wrote:
> Ooops, now I am a bit confused.
> 
> - The initial request, was into the direction of aggregation.
>   Thus I thought, the actual functionality missing is an aggregating generator
>   (probably a more general one than is available with 2.1)

the initial request is about chaining two pipelines and not about
aggregation.

> 
> - The xslt example, I considered just being a topic for general URLs that are capable of referring back to the pipeline engine
>   (And probably this might not be available with Corona natively)

corona-pipeline doesn't support such a scenario, but corona-sitemap does
it the same way as Cocoon 2.x sitemaps by refering to servlet: URLs.

> Reinhard does your answer imply, such referring back should avoid serialization and just link to pipeline events passing
> (e.g. SAX or whatever is passed along a pipeline)?
> 
> I would have considered this an internal optimisation for event streams that are compatible to the user/caller
> (XSLTTransformer in the current example)
> 
> Did I get it wrong?

not sure ;-)

The XSLTTransformer sample is a bit confusing because in this case it is
the stylesheet that is created dynamically by a separate pipeline.
That's neither an aggregation nor a chaining scenario.

HTH

-- 
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

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

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


Re: [cocoon3] Nested pipelines

Posted by Rainer Pruy <Ra...@Acrys.COM>.
Ooops, now I am a bit confused.

- The initial request, was into the direction of aggregation.
  Thus I thought, the actual functionality missing is an aggregating generator
  (probably a more general one than is available with 2.1)

- The xslt example, I considered just being a topic for general URLs that are capable of referring back to the pipeline engine
  (And probably this might not be available with Corona natively)

Reinhard does your answer imply, such referring back should avoid serialization and just link to pipeline events passing
(e.g. SAX or whatever is passed along a pipeline)?

I would have considered this an internal optimisation for event streams that are compatible to the user/caller
(XSLTTransformer in the current example)

Did I get it wrong?

Rainer

Reinhard Pötz schrieb:
> Vyacheslav Sedov wrote:
>> well, can i wish support of dynamic XSLT generation in addition?
>>
>> stage1 - xml1 -> xslt1 -> xslt2
>> stage2 - xml2 -> xslt2 -> result-xml
> 
> The simplest way would be extending the XSLTTransformer class to also
> accept an InputStream for the XSLT file (currently it only supports URLs ).
> 


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


Re: [cocoon3] Nested pipelines

Posted by Reinhard Pötz <re...@apache.org>.
Vyacheslav Sedov wrote:
> well, can i wish support of dynamic XSLT generation in addition?
> 
> stage1 - xml1 -> xslt1 -> xslt2
> stage2 - xml2 -> xslt2 -> result-xml

The simplest way would be extending the XSLTTransformer class to also
accept an InputStream for the XSLT file (currently it only supports URLs ).

-- 
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

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

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


Re: [cocoon3] Nested pipelines

Posted by Vyacheslav Sedov <vy...@gmail.com>.
well, can i wish support of dynamic XSLT generation in addition?

stage1 - xml1 -> xslt1 -> xslt2
stage2 - xml2 -> xslt2 -> result-xml

as simplest example - Schematron rules

with best wishes,
Slav

On Fri, Aug 15, 2008 at 6:04 PM, Reinhard Pötz <re...@apache.org> wrote:
> Carlos Tejo Alonso wrote:
>> Hello,
>>
>> I would like to do that:
>>
>> input_1 -> transformation_2 -> output_1
>> input_2 -> transformation_2 -> output_2
>>
>> output_1 + ouput_2 -> transformation -> output_1+2
>>
>> What's the way to connect 2 pipelines in corona-pipeline?
>
> Currently nested pipelines are not supported directly but it's on my
> wishlist ;-)
>
> For now you could write an InputStreamGenerator (should be very similar
> to the StringGenerator) and take the output of the first pipeline as
> input for the second. That's not optimal solution in terms of
> performance but simple to implement.
>
> HTH
>
> --
> Reinhard Pötz                           Managing Director, {Indoqa} GmbH
>                         http://www.indoqa.com/en/people/reinhard.poetz/
>
> Member of the Apache Software Foundation
> Apache Cocoon Committer, PMC member                  reinhard@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