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 Sat, 18 Mar 2000 23:44:15 GMT
Sorry, forgot to reply to this one.

"Corda, Ugo" wrote:
> 
>                 >Anyway, the real problem is that you want the output based
> on properties
>                 >other than the requestor's.
> 
> Yes, that's the important part. In particular, Cocoon should be able to use
> information about the printer (specified in the client request) in order to
> select:
> 
> -       the appropriate stylesheet
> -       the appropriate formatter: typically FOP, but within FOP I might
> also want to choose either direct PDF generation or Java Printing (via
> AWT/Java2D FOP viewer), depending on the capability of the target printer
> (e.g. a PDF printer vs. a Postscript printer vs. some other strange type of
> printer for which a printer driver exists for Java Print to use)

This is up to who writes the serializers. FOP may or may not be
enough... but yes, that is possible with cocoon2 with no architectural
changes.
 
> Would the sitemap mechanism be able to support the specification of all
> these choices? (Of course I don't expect the sitemap mechanism to know
> anything about printing devices. That is up to whoever writes the sitemap
> itself).

yes
 
> Also, what would be the best way for the client to specify the additional
> request information (i.e. some type of printer identifier in addition to the
> XML document URL) so that it falls nicely within the Apache/Cocoon way of
> acquiring information from the client through an HTTP request?

/printer1/press/2000/march/03.xml
/printer2/press/2000/march/03.xml
/printer3/press/2000/march/03.xml

I suggest to avoid the use of url-encoded parameters. the above is
easier to remember, to visualise and to make non-programmers learn about
it since it looks like any other page... simply it prints the document
on the selected printer and visualizes the report on the browser page
(or a PDF copy of the printout... the possibilities are endless with the
sitemap)
 
>                 >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.
> 
> This part is not clear to me (and anyway I am not familiar with the
> MailServlet flavor to start with -- where can I get more information?). 

java.apache.org/james/ for more info on the JAMES mail server and
MailServlets (even if docs are kind of outdates... but code is in the
java.apache.org CVS JAMES module and actually works!).

> I
> only want to point out that the original request should not have to specify
> the stylesheet/FO for Cocoon to use. That selection should happen
> automatically inside Cocoon based on the printer info specified in the
> request and the sitemap matching mechanism.

Of course.

The sitemap will drive the process associated to the above URI in a way
that the wanted result is out without the user having to mess around
with request properties.

This is how it should _always_ work.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message