You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alessandro Bottoni <ab...@quadrante.com> on 2001/02/12 11:39:22 UTC

How can I generate a XSL:FO document from a XML source file?

[Many thanks to Oliver Gries and John Menke, who answered my previous
question, and please excuse me for this flood of questions: I'm trying hard
to use Cocoon 1.8 for an interesting "single-source/multiple-output"
documentation project]

I have an XML document, that is valid respect to my custom DTD, and I need
to generate a corrisponding XSL:FO document (that is: a document that uses
elements in the "http://www.w3.org/1999/XSL/Format" namespace). This XSL:FO
document will be processed by FOP and the resulting PDF will be sent to the
user agent for the final rendering (using Acrobat Reader).

I tried to use a custom-made XSL-T stylesheet for generating the XSL:FO
document from my XML source. Unfortunately, this technique does not work: I
cannot output the required <?xml version="1.0"> element using a
xsl:processing-instruction() tag because the XSL engine complies about an
illegal operation ("error: processing-instruction cannot be xml"). As a
consequence, the PDF file is not recognised as a PDF file by MS IE and is
not sent to Acrobat Reader for the rendering: it is presented in the MS IE
as a ASCII text file, instead.

Does anybody know how to generate a valid XSL:FO document from a XML source
file?

Does anybody have a working example of such a technique?

Many thanks in advance.

-------------------------------

Alessandro Bottoni
Web Architect
Quadrante SRL
Piazza Galileo, 6
40123 Bologna
abottoni@quadrante.com
http://www.quadrante.com


Re: How can I generate a XSL:FO document from a XML source file?

Posted by Alessandro Marcellini <am...@tiscalinet.it>.
I did it, without any problem.
I included in my stylesheet a the FO elements like you and then xalan did all
the work!
But  I've written a file, without cocoon ...
I hope this can help you ...
Bye
    Alessandro
Alessandro Bottoni wrote:

> [Many thanks to Oliver Gries and John Menke, who answered my previous
> question, and please excuse me for this flood of questions: I'm trying hard
> to use Cocoon 1.8 for an interesting "single-source/multiple-output"
> documentation project]
>
> I have an XML document, that is valid respect to my custom DTD, and I need
> to generate a corrisponding XSL:FO document (that is: a document that uses
> elements in the "http://www.w3.org/1999/XSL/Format" namespace). This XSL:FO
> document will be processed by FOP and the resulting PDF will be sent to the
> user agent for the final rendering (using Acrobat Reader).
>
> I tried to use a custom-made XSL-T stylesheet for generating the XSL:FO
> document from my XML source. Unfortunately, this technique does not work: I
> cannot output the required <?xml version="1.0"> element using a
> xsl:processing-instruction() tag because the XSL engine complies about an
> illegal operation ("error: processing-instruction cannot be xml"). As a
> consequence, the PDF file is not recognised as a PDF file by MS IE and is
> not sent to Acrobat Reader for the rendering: it is presented in the MS IE
> as a ASCII text file, instead.
>
> Does anybody know how to generate a valid XSL:FO document from a XML source
> file?
>
> Does anybody have a working example of such a technique?
>
> Many thanks in advance.
>
> -------------------------------
>
> Alessandro Bottoni
> Web Architect
> Quadrante SRL
> Piazza Galileo, 6
> 40123 Bologna
> abottoni@quadrante.com
> http://www.quadrante.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: <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/faqs.html>

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