cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "g[R]eK" <>
Subject Re: Using Values in the XML in the Pipeline
Date Tue, 15 Nov 2005 20:23:09 GMT
Stewart, Gary napisaƂ(a):
> This is probably a long shot as I haven't seen it mentioned in the documentation. Is
it possible to get a particular value from a transform, say, and use that in the pipeline.
Say I've got a transform that results in the XML:
> <returnid>
>  <primary_guid>86E72DC6-7EDA-47F2-8A3F-D2DA7E121EF0</primary_guid>
> </returnid>
> I want to use that to either generate a using a resource call or to do a redirect (I've
taken into account the redirection in pipelines note;
Passing that value to fetch a document (I can do that in a cinclude though so it can be part
of the same pipe without starting a new generate). 
> It would be handy to do but my current solution would be to transform to a cinclude based
on that returned document structure and carry on the pipeline to get the intended end result.
I think you should use XMLFile Module[1]. Just add to your cocoon.xconf
logger="core.modules.xml" name="primary_guid">
<file src="cocoon:/PrimaryGuidPipe"/>

Then in your second pipeline you can use everywhere you want, for example:
<map:generate src="something_{primiary_guid:/returnid/primary_guid}.xml"/>
<map:transform type="xslt" src="something.xsl">
<map:parameter name="guid" value="{primiary-guid:/returnid/primary_guid}"/>

Hope this helps.


View raw message