DocBook FO root element
Posted: Fri Mar 02, 2007 10:19 pm
Hello. I'm using oXygen 7.2 to write a book in DocBook XML. I have created a XSL customization file containing the following:
I can transform chapters of my book in the shell using the following commands:
(CLASSPATH setting: /Applications/oxygen/lib/fop.jar:/Applications/oxygen/lib/batik.jar:/Applications/oxygen/lib/xalan.jar:/Applications/oxygen/lib/xercesImpl.jar:/Applications/oxygen/lib/avalon-framework-4.1.3.jar)
xsltproc --output test.fo --stringparam fop.extensions 1 /Users/me/Documents/book/custom_docbook.xsl chapter1.xml
java org.apache.fop.apps.Fop -fo test.fo -pdf test.pdf
I can transform chapters of my book in oXygen *unless* I specify my XSL customization file. If I specify my XSL customization file (via "Configure Transformation Scenario | Additional XSLT Stylesheets"), I get the following error:
SystemID: /Users/me/Documents/book/custom_docbook.xsl
Description: ERROR: Document root element for FO output must be one of the following elements: appendix article bibliography book chapter colophon dedication glossary index part preface qandaset refentry reference sect1 section set setindex
Suggestions are much appreciated. thx!
jennifer
Code: Select all
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ng="http://docbook.org/docbook-ng"
xmlns:db="http://docbook.org/ns/docbook"
exclude-result-prefixes="db ng exsl"
version='1.0'>
<xsl:import
href="/Applications/oxygen/frameworks/docbook/xsl/fo/docbook.xsl"/>
<xsl:attribute-set name="xref.properties">
<xsl:attribute name="color">blue</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="guilabel">
<xsl:call-template name="inline.boldseq"/>
</xsl:template>
</xsl:stylesheet>
(CLASSPATH setting: /Applications/oxygen/lib/fop.jar:/Applications/oxygen/lib/batik.jar:/Applications/oxygen/lib/xalan.jar:/Applications/oxygen/lib/xercesImpl.jar:/Applications/oxygen/lib/avalon-framework-4.1.3.jar)
xsltproc --output test.fo --stringparam fop.extensions 1 /Users/me/Documents/book/custom_docbook.xsl chapter1.xml
java org.apache.fop.apps.Fop -fo test.fo -pdf test.pdf
I can transform chapters of my book in oXygen *unless* I specify my XSL customization file. If I specify my XSL customization file (via "Configure Transformation Scenario | Additional XSLT Stylesheets"), I get the following error:
SystemID: /Users/me/Documents/book/custom_docbook.xsl
Description: ERROR: Document root element for FO output must be one of the following elements: appendix article bibliography book chapter colophon dedication glossary index part preface qandaset refentry reference sect1 section set setindex
Suggestions are much appreciated. thx!
jennifer