Matthias,

Simplest solution is to write multiple matches, one for each type of serializer 
you want to use. That's what I do..

Precompilation of the sitemap prevents the use of variables in for instance the 
type attributes of generators, transformers and serializers. The sitemap 
processor pre-loads all necessary objects, while those variables are evaluated 
on request-time... :-P

You could also try to use map:select, but I personally find it a bit clumsy 
most of the time..

Kind regards,
Geert

> -----Original Message-----
> From: Matthias Müller [mailto:[EMAIL PROTECTED]
> Sent: woensdag 8 oktober 2008 9:26
> To: [email protected]
> Subject: AW: How to force a Save As prompt?
>
> Hey, one more question:
> in your example you serialize your stream as xml. i want to
> be flexible with this, e.g. for xml or pdf files.
>
> matthias
>
>
>
> ----- Ursprüngliche Mail ----
> Von: Geert Josten <[EMAIL PROTECTED]>
> An: "[email protected]" <[email protected]>
> Gesendet: Dienstag, den 7. Oktober 2008, 14:32:39 Uhr
> Betreff: RE: How to force a Save As prompt?
>
> Hi,
>
> I typically do something like this:
>
>       <map:match pattern="download/*/**">
>         <map:generate src="cocoon:/{2}"/>
>
>         <map:act type="set-header">
>           <map:parameter name="Content-Type"
> value="application/x-download"/>
>           <map:parameter name="Content-Disposition"
> value="attachment ; filename={1}"/>
>
>           <map:serialize type="xml"/>
>         </map:act>
>       </map:match>
>
> Kind regards,
> Geert
>
> >
>
>
> Drs. G.P.H. Josten
> Consultant
>
>
> http://www.daidalos.nl/
> Daidalos BV
> Source of Innovation
> Hoekeindsehof 1-4
> 2665 JZ Bleiswijk
> Tel.: +31 (0) 10 850 1200
> Fax: +31 (0) 10 850 1199
> http://www.daidalos.nl/
> KvK 27164984
> De informatie - verzonden in of met dit emailbericht - is
> afkomstig van Daidalos BV en is uitsluitend bestemd voor de
> geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
> verzoeken wij u het te verwijderen. Aan dit bericht kunnen
> geen rechten worden ontleend.
>
>
> > From: Matthias Müller [mailto:[EMAIL PROTECTED]
> > Sent: dinsdag 7 oktober 2008 14:28
> > To: users cocoon.apache.org
> > Subject: How to force a Save As prompt?
> >
> > Hi there,
> >
> > is there a way or workaround how i can force a Save As
> prompt for my
> > cocoon output? The problem is that the browser knows the
> mime types of
> > the generated files (xml, pdfs) and displays it instead of
> prompting.
> >
> > regards, matthias
> >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to