cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: XML printing in Cocoon
Date Wed, 15 Mar 2000 11:15:09 GMT
"Corda, Ugo" wrote:
> 
> I have been thinking about a scenario where a browser asks Cocoon to publish
> an XML document on a specified printer. In other words, instead of getting
> the document returned to my browser, I want the document to be directly
> printed on a printer I specify. The stylesheet to associate with the XML
> document should be chosen by Cocoon based on the specified printer, instead
> of on the browser that issues the request.
> 
> Let me give an example of what I am talking about. I ask Cocoon (using some
> appropriate HTTP request) to print the document mydoc.xml on the network
> printer at http://myserver/myprinter. Cocoon selects an appropriate FO-based
> stylesheet using a predefined association between the type of printing
> device specified and a list of stylesheets. Cocoon also selects the
> appropriate formatter (e.g. a PDF formatter or a PS formatter) based on the
> type of printing device specified. After these transformations take place,
> Cocoon sends the output file (PDF or PS) to the specified printer.
> 
> I would like to understand whether:
> 
> 1)      this can already be done in Cocoon, or is planned to be supported in
> Cocoon 2
> 2)      this could be done via a fairly simple modification of the Cocoon
> engine
> 3)      this would require a substantial rework of the Cocoon engine.

Hmmm, good question.

As Donald wisely says, the "printing" is not the real effect, but a side
effect of your request. This because you _must_ return something to the
client when using HTTP.

Now, instead of using the HTTPServlet flavor of Cocoon, I think it's
more reasonable to use the MailServlet flavor. So, you send a mail to
"laser-printer@apache.org" with the FO attatched and Cocoon will handle
it by printing the generated PDF.

Anyway, the real problem is that you want the output based on properties
other than the requestor's.

Then, the answer is 1): Cocoon2 already addresses this with the sitemap.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message