
Hi, A Docbook customization layer should be used in Oxygen too. The XSLT file that is set in the built-in Docbook PDF transformation is already a customization layer: OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/fo/docbook_custom.xsl You can edit this file directly and add an xsl:import like: <xsl:import href="pi-docbook.xsl"/> or you can duplicate the built-in Docbook PDF transformation and change the customization layer file in the XSL URL field with your own XSLT file (for example pi-docbook.xsl) modified so that it imports the above frameworks/docbook/xsl/fo/docbook_custom.xsl file. Regards, Sorin Robert Nagle wrote:
Hi, there,
(I'm on the latest version of Oxygen Author, using FOP PDF transform).
I'd like to use a Dcobook processing instruction for page breaks on PDF -- as mentioned in Bob's book. http://www.sagehill.net/docbookxsl/PageBreaking.html#HardPageBreaks
I'd like to use one of the Oxygen transforms for Docbook. What are my options here? I see that in the transform dialog you have an "Additional XSLT stylesheet" option on the XSLT tab. Can I use that?
I created a file pi-docbook.xsl which is just this:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:d="http://docbook.org/ns/docbook" exclude-result-prefixes="d" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <xsl:template match="processing-instruction('hard-pagebreak')"> <fo:block break-after='page'/> </xsl:template> </xsl:stylesheet>
If I add this simple XSL file to use as an additional XSLT stylesheet (in the Edit Scenario dialog--> XSLT tab), it gave me an error. (See below). It seems to give me some prolog errors. I have used processing instructions successfully if I download my own Docbook XSLT and transform my project using a customization layer (which then imports the docbook files). I know how to do that.
But I'm working for a client and would like to give them something easy which they can do entirely with the Oxygen transforms. Do you have any ideas about how to do PIs? or do you know why I get this error message? thanks.
The process 'Apache FOP' ended with code: 1. The error was: ERROR - Exception org.apache.fop.apps.FOPException: org.xml.sax.SAXParseException; systemId: file:/C:/Users/kingrobert/Documents/Dropbox/job/source/index.xml_xslt; lineNumber: 1; columnNumber: 39; Content is not allowed in prolog. net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; systemId: file:/C:/Users/kingrobert/Documents/Dropbox/job/source/index.xml_xslt; lineNumber: 1; columnNumber: 39; Content is not allowed in prolog. at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source) at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source) at org.apache.fop.cli.Main.startFOP(Main.java:177) at org.apache.fop.cli.Main.main(Main.java:208) Caused by: net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; systemId: file:/C:/Users/kingrobert/Documents/Dropbox/job/source/index.xml_xslt; lineNumber: 1; columnNumber: 39; Content is not allowed in prolog. at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:420) at net.sf.saxon.event.Sender.send(Sender.java:143) at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:46) ... 4 more