You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2000/06/07 10:23:09 UTC
Darkness novel sample
Hello,
when I try the darkness novel fo sample supplied with cocoon I find that
the PDF is generated fine, but it is called darkness-novel.xml instead
of darkness-novel.pdf - where can I specify this extension? I seem to
remember that previously this didn't happen - perhaps something to do
with the new fop version 0.13.0?
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: Darkness novel sample
Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:
>
> Hello,
>
> when I try the darkness novel fo sample supplied with cocoon I find that
> the PDF is generated fine, but it is called darkness-novel.xml instead
> of darkness-novel.pdf - where can I specify this extension? I seem to
> remember that previously this didn't happen - perhaps something to do
> with the new fop version 0.13.0?
no, it's always been that way.
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<st...@apache.org> Friedrich Nietzsche
--------------------------------------------------------------------
Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------
Re: Darkness novel sample
Posted by Berin Loritsch <bl...@infoplanning.com>.
It would be up to you to implement the logic as to what to send.
Sitemap (Cocoon 2) is awesome in the regards of what you want
to accomplish. The only potential problem you run into is with
Internet Exploder (er, explorer)--When it sees the extension *.xml,
it wants to process the returned page as XML instead of looking
at the MIME type. Very bad disregarding of HTTP standards.
The way around that is to add the '?' to the end, which will force
the browser to look at the MIME type. It would look like this:
http://host.domain.tld/file.xml?
When IE goes to save it, it will rewrite the extension. Cocoon will
be able to find the file in question. If you want to not use extensions
at all, then you would have to save your files without extensions
in Cocoon 1.x.x and tell the servlet engine to feed Cocoon all files
without extensions.
Remember, sitemap in C2 will fix alot of these kludges. As it stands
now, Cocoon is very cool--but it will be twice as good in V2.
Ulrich Mayring wrote:
> Berin Loritsch wrote:
> >
> > Unfortunately this work-around forces you to break the MIME-type
> > contract. (An XML file is not a PDF file).
>
> Strange, I seem to remember that this worked previously, but I may be
> wrong.
>
> How about if I just use no extension and a parameter, like this:
>
> http://host.domain.tld/file?giveme=pdf
> http://host.domain.tld/file?giveme=xml
>
> Quite a hack, I know....
>
> Ulrich
>
> --
> Ulrich Mayring
> DENIC eG, Systementwicklung
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Darkness novel sample
Posted by Ulrich Mayring <ul...@denic.de>.
Berin Loritsch wrote:
>
> Unfortunately this work-around forces you to break the MIME-type
> contract. (An XML file is not a PDF file).
Strange, I seem to remember that this worked previously, but I may be
wrong.
How about if I just use no extension and a parameter, like this:
http://host.domain.tld/file?giveme=pdf
http://host.domain.tld/file?giveme=xml
Quite a hack, I know....
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: Darkness novel sample
Posted by Berin Loritsch <bl...@infoplanning.com>.
With Cocoon 1.x.x, the file names reflect the file system. If you request a
file from Cocoon called darkness-novel.xml (like the page is doing), then
the file returned is called the same thing.
In order to get around this limitation, you would have to change the
extension of darkness-novel.xml to darkness-novel.pdf and map your
servlet engine to process *.pdf files. In order to perpetuate the ability
to
serve regular PDF files, you would probably use the following URI:
"/generated/*.pdf". That way everything in that directory would be
processed by Cocoon.
Unfortunately this work-around forces you to break the MIME-type
contract. (An XML file is not a PDF file).
Ulrich Mayring wrote:
> Hello,
>
> when I try the darkness novel fo sample supplied with cocoon I find that
> the PDF is generated fine, but it is called darkness-novel.xml instead
> of darkness-novel.pdf - where can I specify this extension? I seem to
> remember that previously this didn't happen - perhaps something to do
> with the new fop version 0.13.0?
>
> Ulrich
>
> --
> Ulrich Mayring
> DENIC eG, Systementwicklung
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org