Thanks Jasha,

Adding the attribute mime-type="application/zip" to the <map:serialize
type="zip"/> fixes the problem!

However, it is already in the in the main sitemap.xmap:

 <map:serializer logger="sitemap.serializer.zip" mime-type="application/zip"
name="zip" src="org.apache.cocoon.serialization.ZipArchiveSerializer"/>

So why should this be necessary?



Jasha Joachimsthal-2 wrote:
> 
> Hello Steve 
> 
>> -----Original Message-----
>> From: Steve Cameron [mailto:[EMAIL PROTECTED] 
>> Sent: maandag 25 augustus 2008 1:46
>> To: users@cocoon.apache.org
>> Subject: Re: ZipArchiveSerializer question
>> 
>> 
>> Hello Alfred,
>> 
>> Say have a url 'http://mysite.com/cocoon/test.xml' and I want 
>> to add an option to save the same test.xml file as a zip archive.
>> 
>> I see now that if I have the following sitemap:
>> 
>>      <map:match pattern="*.zip">
>>         <map:generate src="nothing.xml" type="file"/>
>>      <map:transform src="zip.xsl">
>>              <map:parameter name="source" value="{1}"/>      
>>      </map:transform>
>>         <map:serialize type="zip"/>
>>      </map:match>
> 
> 
>> I am directing the output of the "*" pipeline into the 
>> "*.zip" pipeline.
>> 
>> This almost seems to work, but the browser does not seem to 
>> understand that file is a zip, so maybe I'm still doing 
>> something incorrectly, thanks for your help.
>> 
>> Steve Cameron
> 
> Have you defined a mime-type for the zip-serializer?
> If not, try adding the attribute mime-type="application/zip" to either
> <map:serialize type="zip"/> in your pipeline or to the <map:serializer
> name="zip"/> in map:components. 
> 
> Jasha Joachimsthal 
> 
> www.onehippo.com
> Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
> San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
> 94952-3329 +1 (707) 773-4646
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ZipArchiveSerializer-question-tp19082078p19154099.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to