cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Øie <k...@gan.no>
Subject RE: RE: XML --> CSV file download to client
Date Fri, 15 Feb 2002 11:44:01 GMT
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  <<< 
          |
>>> +-------------------------------------------------------------
>>> --------+
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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>
>>>
>
>


--
+-------------------------------+-------------------------------------+
|    Peter C. A. Bär            | Siemens Business Services & Co. OHG |
|    Fon  +49.911.654-2387      | Von-der-Tann-Str. 30-31             |
|    Fax  +49.911.654-2108      | 90439 Nürnberg                      |
|                               | Deutschland                         |
+-------------------------------+-------------------------------------+
|              >>>  mailto:Peter.CA.Baer@Siemens.com  <<<             |
+---------------------------------------------------------------------+


---------------------------------------------------------------------
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>


---------------------------------------------------------------------
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