DocBook FO root element
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 2
- Joined: Fri Mar 02, 2007 10:04 pm
DocBook FO root element
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
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Jennifer,
A customisation layer is a stylesheet that imports the docbook stylesheet and adds some paratemetrs, templates, etc. Due to the import precedence then this stylesheet actually overwrites the docbook default processing.
Now all you need is to set your stylesheet instead of the docbook one in a transformation scenario (do not add it as additional XSLT stylesheet).
Best Regards,
George
A customisation layer is a stylesheet that imports the docbook stylesheet and adds some paratemetrs, templates, etc. Due to the import precedence then this stylesheet actually overwrites the docbook default processing.
Now all you need is to set your stylesheet instead of the docbook one in a transformation scenario (do not add it as additional XSLT stylesheet).
Best Regards,
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service