You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Mark S. Kent" <ma...@vistyx.com> on 2001/11/02 00:19:55 UTC

Creating CSV and XML files

We are using JBoss and beans to manage the other pages in our site but I'm
using Cocoon2 for the reports because they have the ability to take data and
create other formats (namely HTML,PDF,CSV,and XML).  Our reports will be
available in any of the formats and I'd like to use the same query in ESQL
in my XML file for all of them.

So, has anyone "called" Cocoon2 page from a from "outside" of Cocoon that
will run the query, create the file in a user's temporary folder, then
redirect back to the report form selection screen?

I'm able to get the reports for HTML and PDF to simply display in the
browser's bottom frame of our app, but was planning on providing a "link" to
the CSV and XML reports file as they tend to want to be "handled" by the
browser.  I'd rather have a "right-click-Save-As" link than trying to worry
about what a browser will "attempt" to do with the file.

Mark


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

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


Re: Creating CSV and XML files

Posted by Heath Stewart <hs...@esotericrealm.com>.
Since the reports on created on your server, right-clicking on the link that
normally displays it in your bottom frame should download the file. The
browser has nothing to do with that. So, if you had something like the
following <a/> tag:

<a href="/reports/somereport.pdf" target="bottom">Some Report</a>

...that normally displayed it in your bottom frame, right-click and select
save as. The PDF is still downloaded. This is assuming that your sitemap
contains a mapping for /reports/*.pdf or something like to apply the FOP
stylesheet and serializer to it.

Heath Stewart
Network Administrator / Web Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu
----- Original Message -----
From: "Mark S. Kent" <ma...@vistyx.com>
To: <co...@xml.apache.org>
Sent: Thursday, November 01, 2001 5:19 PM
Subject: Creating CSV and XML files


> We are using JBoss and beans to manage the other pages in our site but I'm
> using Cocoon2 for the reports because they have the ability to take data
and
> create other formats (namely HTML,PDF,CSV,and XML).  Our reports will be
> available in any of the formats and I'd like to use the same query in ESQL
> in my XML file for all of them.
>
> So, has anyone "called" Cocoon2 page from a from "outside" of Cocoon that
> will run the query, create the file in a user's temporary folder, then
> redirect back to the report form selection screen?
>
> I'm able to get the reports for HTML and PDF to simply display in the
> browser's bottom frame of our app, but was planning on providing a "link"
to
> the CSV and XML reports file as they tend to want to be "handled" by the
> browser.  I'd rather have a "right-click-Save-As" link than trying to
worry
> about what a browser will "attempt" to do with the file.
>
> Mark
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


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

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