cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Kuehne <>
Subject Re: Hand over XSL variable value - wrong list?
Date Wed, 28 Jul 2010 19:30:06 GMT

 havn't read thru this whole thread. But my quick solution would be the cinclude 
transformer. You can construct the pipleine you like to call and pass any 
paramter in the way it's most convenient for you..

Btw I would give the cinclude transformer the alias 
'pipelineInvocationTransformer' ;-)



----- Original Message ----
From: Steven D. Majewski <>
Sent: Wed, July 28, 2010 5:24:37 PM
Subject: Re: Hand over XSL variable value - wrong list?

You can't generate a pipeline parameter *within* the pipeline.
You'll have to split it into two (or more) separate pipelines.
There are several ways of doing that.
One method would be to use flowscript:

    processPipelineTo( ... ) # this step does the xslt transform and outputs the 
<file> element...
                 # returns an output stream...
                 # parse the output and grab /files/file/text() ...
    sendPage( ... )      # call 2nd pipeline adding file value as a parameter.

But maybe the OP should think about whether it's really necessary to route that 
thru the
sitemap as a parameter.  Take a look, for example, at the Zip archive serializer 

Note especially that the sources can be other pipelines, so files in the zip 
can be generated on the fly.

( If what you're trying to do doesn't seem to fit into the pipeline model, 
  you just have to rethink whether you need to "push" or "pull" . )

In the original post, it was also unclear whether the XSL variable was going to 
part of the output of the transform, or if the OP expected to somehow get it's 
as a side effect of doing the transform. The only way to get something out of 
transform is thru it's output -- there are no side effects.

-- Steve Majewski

On Jul 28, 2010, at 4:48 AM, Alec Bickerton wrote:

> XML is generated via a generator.
> <data>
>     <name>file</name>
>     <value>Albatross</value>
>     <temp.path>/tmp/files/xyz/</temp.path>
> </data>
> A transformation occurs so that the XML looks like ...
> <files>
>     <file name="Albatross">/tmp/files/xyz/Albatross</file>
> </files>
> Later in the pipe, and action could be to do something to the file (Compress it 
>for example)
> something like <map:act type="doMagic" 
>     ... do some other stuff...
> </map:act>
> Having spoken with the OP, theyare looking for a way to pass the value of the 
>file element in the transformed XML to the
> sitemap. Maybe I've missed something obvious but I would have thought this 
>functionality would be present in the framework.
> My assumption is that the DOM is held in memory somewhere after generation and 
>passed to the various transformers before
> eventually being serialised. Surely there is a way to access the content of the 
>DOM prior to serialisation. Does anyone
> know how?
> Alec,

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message