cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Christoph Alexander Bär <comet.fri...@gmx.net>
Subject Re: RE: RE: XML --> CSV file download to client
Date Mon, 18 Feb 2002 01:55:04 GMT

Looks like this was somebody else's problem before. Searching the mailing
list archive I found this posting that has seemingly never been answered:

XML to CSV issues
http://www.mail-archive.com/cocoon-users@xml.apache.org/msg03872.html

I have precisely the same problem: I have to enclose my document in XML
tags in order to make it work, but that is not what we want. We need a plain 
CSV text file. Has anyone solved that issue?

Karl: Thanks, but where do I do this in Cocoon 1.8.2? What file?
Or is this hint C2 only?

Environment: Cocoon 1.8.2, Tomcat 3.2.4, Blackdown J2SDK 1.3.1, 
SuSE Linux 7.3.

Regards 
	Peter

>Karl Øie wrote:
>if i get this right, the easiest way would be to put up a new match in the
>pipeline;
>
>        <map:match pattern="**.cvs">
><dostuff/>
><map:serialize type="text"/>
></map:match>
>
><map:match pattern="**.html">
><dostuff/>
><map:serialize type="html"/>
></map:match>
>
><map:match pattern="**.xml">
><dostuff/>
><map:serialize type="xml"/>
></map:match>
>
>then the cvs file would get the name some-page.cvs ?!?
>
>mvh karl
>
>
>-----Original Message-----
>From: Baer Peter [mailto:Peter.Baer@nbg.sbs.de]
>Sent: 15. februar 2002 11:31
>To: cocoon-users@xml.apache.org
>Subject: Re: RE: XML --> CSV file download to client
>
>
>
>"text/plain" works, but I still have the file name problem...
>
><karl@gan.no> wrote:
> >you could just try "test/plain" for csv ...
>
>
>>Peter Christoph Alexander Bär wrote:
>> Thanks for the quick response. Although the two of us are German,
>> obviously, let's stick to English with respect to the other users of
>> this mailing list. ;-)
>>
>> I have this...
>>
>> <xsl:processing-instruction name="cocoon-format">
>> type="text/x-csv"
>> </xsl:processing-instruction>
>>
>> and get that...
>>
>> java.lang.Exception: No formatter for type "text/x-csv"
>>
>> That's why I wonder, if this MIME type is supported, at all, by C1.
>>
>> Unfortunately we were so far unable to get C2 running the way we need
>> it, which probably means that we cannot use the sitemap trick suggested
>> in the thread on xml writing to a file.
>>
>>
>> Kubanek, Petr wrote:
>>
>>> (1)
>>> When a user clicks on a specific hyperlink, a CSV file should be
>>> created and sent to him. The file should not have the name of the
>>> page called. Instead of .xml the file extension must be .csv.
>>>
>>> For the moment, it is good enough to have the user right-click on
>>> the hyperlink in order to get the file downloaded instead having it
>>> displayed in their browser. But the filename is the name of the page,
>>> which is not what we want...
>>>
>>> I've read the thread "writing xml to file" and others on this list.
>>> Do I really have to change the sitemap, here? Or is there any other
>>> way to change the file name? Is changing the sitemap the only means
>>> to avoid having the content of the file enclosed in XML tags?
>>>
>>
>> You have to change mime type. How browser save file is browser
>> dependinding
>> - are you serving dynamic or static CVS files?
>>
>>
>>> (2)
>>> There's a MIME type for CSV (x-csv). What is the exact syntax to
>>> set this MIME type?
>>>
>>> type=text/x-csv
>>>
>>> results in an error message. Can it be that the type is not supported
>>> by Cocoon?
>>>
>>
>> Most probably type="text/x-csv". Hochkomas sind wichtig!
>>
>>
>>> Environment:
>>> Cocoon 1.8.2 (sorry, despite all the gentle support on
>>> the list we couldn't get C2 running with X, and we don't have the time
>>> for experiments, right now)
>>> Tomcat 3.2.4
>>> SuSE Linux 7.3.
>>> Xfree86 4.1
>>> Blackdown J2SDK 1.3.1-02a
>>>
>>> Thanks!
>>>
>>> --
>>> +-------------------------------+-----------------------------
>>> --------+
>>> |              >>> mailto:Peter.CA.Baer@Siemens.com <<< |
>>> +-------------------------------------------------------------
>>> --------+


-- 
---------------------------------------------------------------------
      Eric:  I want to live in a world where software doesn't suck.
   Richard:  Any software that isn't free sucks.
     Linus:  I'm interested in free beer.
---------------------------------------------------------------------

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message