You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by PETER BRIAN BRADBURN <bb...@aber.ac.uk> on 2002/09/02 14:28:44 UTC

Using Pipeline with third party converters

Hi,
As part of a project I am conducting I am looking into the possibility of using the Cocoon Pipeline to manage the use of a third party format converter such as a2ps (which converts a variety of file formats into PS for printing. 

* How could I go about this?
* Is it possible?

I would prefer not to use a custom reader, unless this is the only way of going about it.

Your feedback would be greatly welcome
Thanks
Pete Bradburn

Re: Using Pipeline with third party converters

Posted by Nicola Ken Barozzi <ni...@apache.org>.
PETER BRIAN BRADBURN wrote:
>  
> Hi,
> As part of a project I am conducting I am looking into the possibility 
> of using the Cocoon Pipeline to manage the use of a third party format 
> converter such as a2ps (which converts a variety of file formats into PS 
> for printing.
>  
> * How could I go about this?
> * Is it possible?

To convert from XML to PS, you can write a Serializer.
Look in th documentation and in teh Wiki for more info.

> I would prefer not to use a custom reader, unless this is the only way 
> of going about it.

If you do nonxml->nonxml a Reader is the only way I'm afraid.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Using Pipeline with third party converters

Posted by Conal Tuohy <co...@paradise.net.nz>.
If you have an existing application which you can't easily port to Cocoon
you can package it as a CGI application. Then you can invoke it from Cocoon,
and also use Cocoon to pass it the data it needs.

I've used this technique to embed a Microsoft eBook compiler into a Cocoon
app. The user requests the cgi output (a Microsoft Reader eBook) from an
ordinary reader, which encapsulates the cgi, and passes it parameters. The
cgi program (makelit.exe) also reads data from Cocoon (the url which is
passed to the cgi is the url of a Cocoon pipeline which provides data to the
eBook compiler). In my case I had the C++ source for the eBook compiler, so
I could modify it to be a cgi app, but otherwise you can always wrap your
application in some kind of shell script.

<!-- MS Reader (.lit) file -->
<map:match pattern="etexts/*.lit">
    <map:read
src="http://localhost/cgi-bin/makelit.exe?http://localhost/etexts/{1}.opf"/>
</map:match>

browser    cocoon     cgi-app
   |          |          |
   | request  |   read   |
   | -------> | -------> |
   |          |          |
   |          | get data |
   |          | <------- |
   |          |          |
   |          | <------- |


-----Original Message-----
From: PETER BRIAN BRADBURN [mailto:bbb98@aber.ac.uk]
Sent: Tuesday, 3 September 2002 00:29
To: cocoon-users@xml.apache.org
Subject: Using Pipeline with third party converters



Hi,
As part of a project I am conducting I am looking into the possibility of
using the Cocoon Pipeline to manage the use of a third party format
converter such as a2ps (which converts a variety of file formats into PS for
printing.

* How could I go about this?
* Is it possible?

I would prefer not to use a custom reader, unless this is the only way of
going about it.

Your feedback would be greatly welcome
Thanks
Pete Bradburn


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>