cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Homeijer <M.Homei...@devote.nl>
Subject RE: XML-Based Selection (Redirect Serializer?)
Date Thu, 28 Feb 2002 10:37:32 GMT
Hi Stephano,

What do you think of the suggestion in the mailing list from Bruno Dumon?
Most transformers that write data or writable sources/drains return a small
amount of data (ie. success/failure, message, generated keyvalue). Would it
be a performance problem to stream the result into a dom tree, use a
selector (xpath based) to select a new pipeline based on the result and
continue with the rest of the pipeline (with the option to stream the result
into the new pipeline again). If this is considered not clean or resulting
in a performance problem, maybe somebody (hint) could post an RT on how to
support this with generic cocoon components, as from my opinion this is a
"big" problem in the current cocoon implementation.

In the current situation, the pipelines parts for incoming data and the
parts for outgoing data are executed without having a possibility to change
the outgoing pipeline based on the data returned from the incoming part.

I think we need a general solution to this kind of problem in which you will
still be able to use standard cocoon components and not everyone having to
write his own selectors (FS? ;-)). 

TIA,
Michael

> -----Original Message-----
> From: Stefano Mazzocchi [mailto:stefano@apache.org]
> Sent: woensdag 27 februari 2002 19:25
> To: cocoon-dev@xml.apache.org
> Subject: Re: XML-Based Selection (Redirect Serializer?)
> 
> 
> James Burton wrote:
> > 
> > Hi all!  We're working on a Cocoon 2 project and
> > *very* strongly need the ability to "branch" to a
> > different pipeline or part of a pipeline based on the
> > XML output of a Transformer.  This is because we use a
> > custom Transformer for communicating with an EJB back
> > end.  Originally I thought to use an XML selector like
> > this:
> > 
> > <map:match pattern="example">
> >   <map:generate src="..." />
> >   <map:transform type="custom-ejb-interface">
> >     ...
> >   </map:transform>
> >   <map:select type="xml" node="/result/flag">
> >     <map:when test="normalResult">
> >       <map:transform src="styles/normal.xsl" />
> >     </map:when>
> >     <map:when test="specialResult">
> >       <map:transform type="custom-ejb-interface">
> >         ...
> >       </map:transform>
> >       <map:transform src="styles/special.xsl" />
> >     </map:when>
> >   </map:select>
> >   <map:serialize />
> > </map:match>
> 
> What about writing a custom selectors that connects to the EJB logic?
> will sure be faster and cleaner than to have to serialize 
> things as SAX
> events, and have a selectors look into the pipe for that.
> 
> -- 
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <stefano@apache.org>                             Friedrich Nietzsche
> --------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

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


Mime
View raw message