cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Dovydaitis <vi...@foliage.com>
Subject Re: Cocoon+XML+FOP -> .fo -> .pdf ?
Date Wed, 28 Jun 2000 18:30:24 GMT
In your initial xml file place the following lines (outside the document root):

<?cocoon-process type="xslt"?>
<?xml-stylesheet href="make-fo.xsl" type="text/xsl"?>

where make-fo.xsl is your stylesheet.
Within the make-fo.xsl page place the following line:

<xsl:template match="your-doc-root-tag">
<xsl:processing-instruction
name="cocoon-format">type="text/xslfo"</xsl:processing-instruction>
<fo:root ...
...
</xsl:template>

For a more detailed example look at the source in "samples/fo/novel-fo.xsl" and
"samples/fo/darkness-novel.xml" in the cocoon distribution.

jack jack wrote:

> I have some XML documents for which I have written XSL stylesheets which
> transform the XML into FO documents, which can then be transformed into PDF.
>   Both transformations are done using the commandline java programs that
> come with FOP.
>
> Can I get this to all happen automatically with Apache+Cocoon?  I know that
> Cocoon will automatically turn the .fo documents into PDF if so specified (I
> have this working), but is it possible to get Cocoon to apply the stylesheet
> to the XML document first (producing the .fo document), then apply the
> transformation to PDF?
>
> Doug Tidwell's tutorial at IBM
> (http://www-4.ibm.com/software/developer/education/transforming-xml/xmltopdf/index.html)
> seems to imply that this is possible, but I can't get it to work.  Pointers,
> anyone?
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message