cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <dho...@csir.co.za>
Subject Re: Using the output of a pipeline to call another pipeline?
Date Tue, 27 Sep 2005 10:35:26 GMT
Its not clear what you mean by the "second pipeline" - do
you mean the **.jpg ?  If so, can you not simply call that
from the page where it needs to appear?  (And the page
itself is generated using the output from the first pipeline;
cinclude or simply a map:aggregate will feed the XML into your 
page prior to a final transform.)
 
If you need more help, you may have to lay out your problem
a little more clearly.

>>> my.name.is.hans@gmail.com 2005/09/27 11:40:16 AM >>>
I've got a very basic question that I got stuck with.... maybe someone
can help me out?

I have a web publishing system that stores all images in eXist, using
a number as the file name, e.g. 44500.jpg

Each image has a metadata file, describing at what URL the image
should be shown (and also some other things, not shown here), e.g.
<metadata>
<live><at>webdesign/cocoon</at></live>
<filename>banner.jpg</filename>
</metadata>

In the html files, the url to the file points at its virutal location,
and virtual name, e.g. webdesign/cocoon/banner.jpg
Thus, I could write a cocoon sitemap matcher like this:

<map:match pattern="*/*/*.jpg>
<map:generate src="xq/{1}.xq" type="xquery">
<map:parameter name="file" value="{1}/{2}/{3}"/>
</map:generate>
? How to call the second pipeline with the result of the query?
</map:match>

The xquery generates the file name to use in the second pipeline, like this
<file>
44500.jpg
</file>

The image is then to be fetched from eXist using this pipeline:
<map:match pattern="*.jpg">
<map:read type="image"

src="http://guest:guest@localhost:8080/cocoon/webdav/db/contents/jpeg/{1}.jpg" "
mime-type="text/jpg "/>
</map:match>

But how do I call the second pipeline, using the file name created by
the generator in the first pipeline? This is a very basic question,
but I got stuck with it anyway... Any ideas?

Hans

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




-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
HelpDesk@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


Mime
View raw message