You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tim Cavanagh <ti...@tafe.sa.edu.au> on 2002/08/29 12:29:20 UTC

Fop and extensions ... sorry

Hi folks,

Sorry I know this has been posted b4 but I still cant find the answer!!!

I am using the following code to pass a request to serialise a pdf for
output. Now it works great ... But damn explorer does not recognise the mime
type as a pdf doc but it does know its a binary file. It just sees the
extension (.xml) and downloads the file but opens it with the app associated
with xml files......sheesh. I have seen the fix for applying a ?pdf=.pdf at
the end of the uri etc and unfortunately cause I am already passing a
parameter it causes an error. Has anyone got a fix?? Please....

<map:match pattern="display_Works/**.xml">
  <map:generate src="display_Works/{1}.xml"/>
  <map:match type="request" pattern="style">
    <map:transform src="{1}.xsl"/>
    <map:serialize />
  </map:match>
  <map:match type="request" pattern="pdf">
     <map:transform src="{1}.xsl"/>
      <map:serialize type="fo2pdf" />
  </map:match>
  <map:transform src="xsl_display_course.xsl"/>
  <map:serialize />
</map:match>


Regards

Tim Cavanagh
Douglas Mawson Institute of Technology
Australia


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

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


Re: Fop and extensions ... sorry

Posted by Tim Cavanagh <ti...@tafe.sa.edu.au>.
Hi Koen,

Thanks that is a great solution and works well. But how can I use this to
remove the request params? Don¹t hey have to be explicit cause one is
serializing with fop and the other is just the default?

Cheers

Tim
 
On 29/8/02 8:19 PM, "Koen Pellegrims" <ko...@pandora.be> wrote:

> Simple solution: you could match on any extension, so the browser can ask
> for "display_Works/file.pdf?style=green"
> 
> <map:match pattern="display_Works/**.*">
> 
> You could use this mapping to remove the 'pdf' request parameter as well.
> 
> Koen
> 
>> -----Oorspronkelijk bericht-----
>> Van: Tim Cavanagh [mailto:timcavan@tafe.sa.edu.au]
>> Verzonden: donderdag 29 augustus 2002 12:29
>> Aan: cocoon-users@xml.apache.org
>> Onderwerp: Fop and extensions ... sorry
>> 
>> 
>> Hi folks,
>> 
>> Sorry I know this has been posted b4 but I still cant find the answer!!!
>> 
>> I am using the following code to pass a request to serialise a pdf for
>> output. Now it works great ... But damn explorer does not
>> recognise the mime
>> type as a pdf doc but it does know its a binary file. It just sees the
>> extension (.xml) and downloads the file but opens it with the app
>> associated
>> with xml files......sheesh. I have seen the fix for applying a
>> ?pdf=.pdf at
>> the end of the uri etc and unfortunately cause I am already passing a
>> parameter it causes an error. Has anyone got a fix?? Please....
>> 
>> <map:match pattern="display_Works/**.xml">
>>   <map:generate src="display_Works/{1}.xml"/>
>>   <map:match type="request" pattern="style">
>>     <map:transform src="{1}.xsl"/>
>>     <map:serialize />
>>   </map:match>
>>   <map:match type="request" pattern="pdf">
>>      <map:transform src="{1}.xsl"/>
>>       <map:serialize type="fo2pdf" />
>>   </map:match>
>>   <map:transform src="xsl_display_course.xsl"/>
>>   <map:serialize />
>> </map:match>
>> 
>> 
>> Regards
>> 
>> Tim Cavanagh
>> Douglas Mawson Institute of Technology
>> Australia
>> 
>> 
>> ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in the
>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html>

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


Re: Fop and extensions ... sorry

Posted by Tim Cavanagh <th...@mac.com>.
Hi Koen,

Thanks that is a great solution and works well. But how can I use this to
remove the request params? Don¹t hey have to be explicit cause one is
serializing with fop and the other is just the default?

Cheers

Tim
 
On 29/8/02 8:19 PM, "Koen Pellegrims" <ko...@pandora.be> wrote:

> Simple solution: you could match on any extension, so the browser can ask
> for "display_Works/file.pdf?style=green"
> 
> <map:match pattern="display_Works/**.*">
> 
> You could use this mapping to remove the 'pdf' request parameter as well.
> 
> Koen
> 
>> -----Oorspronkelijk bericht-----
>> Van: Tim Cavanagh [mailto:timcavan@tafe.sa.edu.au]
>> Verzonden: donderdag 29 augustus 2002 12:29
>> Aan: cocoon-users@xml.apache.org
>> Onderwerp: Fop and extensions ... sorry
>> 
>> 
>> Hi folks,
>> 
>> Sorry I know this has been posted b4 but I still cant find the answer!!!
>> 
>> I am using the following code to pass a request to serialise a pdf for
>> output. Now it works great ... But damn explorer does not
>> recognise the mime
>> type as a pdf doc but it does know its a binary file. It just sees the
>> extension (.xml) and downloads the file but opens it with the app
>> associated
>> with xml files......sheesh. I have seen the fix for applying a
>> ?pdf=.pdf at
>> the end of the uri etc and unfortunately cause I am already passing a
>> parameter it causes an error. Has anyone got a fix?? Please....
>> 
>> <map:match pattern="display_Works/**.xml">
>>   <map:generate src="display_Works/{1}.xml"/>
>>   <map:match type="request" pattern="style">
>>     <map:transform src="{1}.xsl"/>
>>     <map:serialize />
>>   </map:match>
>>   <map:match type="request" pattern="pdf">
>>      <map:transform src="{1}.xsl"/>
>>       <map:serialize type="fo2pdf" />
>>   </map:match>
>>   <map:transform src="xsl_display_course.xsl"/>
>>   <map:serialize />
>> </map:match>
>> 
>> 
>> Regards
>> 
>> Tim Cavanagh
>> Douglas Mawson Institute of Technology
>> Australia
>> 
>> 
>> ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in the
>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html>

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


RE: Fop and extensions ... sorry

Posted by Koen Pellegrims <ko...@pandora.be>.
Simple solution: you could match on any extension, so the browser can ask
for "display_Works/file.pdf?style=green"

 <map:match pattern="display_Works/**.*">

You could use this mapping to remove the 'pdf' request parameter as well.

Koen

> -----Oorspronkelijk bericht-----
> Van: Tim Cavanagh [mailto:timcavan@tafe.sa.edu.au]
> Verzonden: donderdag 29 augustus 2002 12:29
> Aan: cocoon-users@xml.apache.org
> Onderwerp: Fop and extensions ... sorry
>
>
> Hi folks,
>
> Sorry I know this has been posted b4 but I still cant find the answer!!!
>
> I am using the following code to pass a request to serialise a pdf for
> output. Now it works great ... But damn explorer does not
> recognise the mime
> type as a pdf doc but it does know its a binary file. It just sees the
> extension (.xml) and downloads the file but opens it with the app
> associated
> with xml files......sheesh. I have seen the fix for applying a
> ?pdf=.pdf at
> the end of the uri etc and unfortunately cause I am already passing a
> parameter it causes an error. Has anyone got a fix?? Please....
>
> <map:match pattern="display_Works/**.xml">
>   <map:generate src="display_Works/{1}.xml"/>
>   <map:match type="request" pattern="style">
>     <map:transform src="{1}.xsl"/>
>     <map:serialize />
>   </map:match>
>   <map:match type="request" pattern="pdf">
>      <map:transform src="{1}.xsl"/>
>       <map:serialize type="fo2pdf" />
>   </map:match>
>   <map:transform src="xsl_display_course.xsl"/>
>   <map:serialize />
> </map:match>
>
>
> Regards
>
> Tim Cavanagh
> Douglas Mawson Institute of Technology
> Australia
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.html>

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