Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

DocBook Filters - Read and write docbook xml using OpenOffice.org

The project goal is to explore the possibility of using OpenOffice.org as a WYSIWYG editor of XML content. The principle is to edit structured documents using styles. These styles are then transformed to XML tags on export.

Anyone from community is welcome to join the project. The current issues and enhancements filed for DocBook are these.

This page shows how to enable and use the DocBook filters. It also shows the location of the stylesheets so that users can download and use the latest transformations. The filter provided on this page is based on earlier releases of the DocBook filter. New features include:

Enabling the DocBook XSLT's in OpenOffice.org

For these releases there are three different ways of enabling the DocBook filters.

1. Download the DocBook XSLT Stylesheets and OpenOffice.org Style Template

This method ensures that the most recent stylesheets and OpenOffice.org style template are used for import and export. To import, export and modify DocBook documents in OpenOffice.org, it is necessary to download the following:

The most recent stylesheets support the import and export of DocBook documents with article or chapter as the top-level tag. The different stylesheets required for each of these operation are listed below:



Stylesheets required for import
Article Chapter
docbooktosoffheadings.xsl docbooktosoffheadings.xsl

Stylesheets required for export
Article Chapter
sofftodocbookheadings_article.xsl sofftodocbookheadings_chapter.xsl

OpenOffice.org Template required for Article and Chapter documents:

Creating a new DocBook filter


To create a DocBook Article filter, the above steps can be repeated with article replacing chapter

2. Download the DocBook XSLT Jar Packages for Article or Chapter

This method of enabling the DocBook filters is more convenient, but it does not guarantee that the most recent stylesheets and OpenOffice.org template are used. TBD

3. Download the DocBook UNO component for Article only

The DocBook UNO component adds filter support for the retention of unresolved XML entities.

How to Import a DocBook document

A DocBook article or chapter document can now be opened using the File -> Open dialog.

The DocBook XSLT filter should automatically determine the root element of the document and import it with the matching XSLT filter.
Alternatively, it is possible to browse manually to the desired DocBook filter in the File Type combo-box in the File -> Open dialog.

How to Export a DocBook document

The DocBook document can also be exported using the File -> Save As dialog.

Again, the DocBook XSLT filter should automatically determine the file type and export with the matching XSLT filter.
Alternatively, it is possible to browse manually to the desired DocBook filter in the File Type combo-box in the File -> Save As dialog.

Using OpenOffice.org Headings and Styles for different DocBook tags

Using OpenOffice.org styles to represent DocBook tags

The style template supplies all of the custom styles that are currently supported. Once a DocBook document has been imported to OpenOffice.org, the available DocBook specific styles can be viewed using the Stylist. On import, each of the supported DocBook tags will be mapped to formatted OpenOffice.org content. Similarly, to modify the imported DocBook document, OpenOffice.org text styles can be used to represent the DocBook tags marking-up the text.

NOTE: A new DocBook document can be created in OpenOffice.org by opening the DocBookTemplate.stw. The document can then be saved as a DocBook document, and the new content will be represented as DocBook mark-up.

How to create new DocBook content:

How to create DocBook sections:

Initially the DocBook project used OpenOffice.org sections to enforce the nesting of DocBook sections. Feedback has shown that authors wish to use the common word processing styles such as Heading1, Heading2, etc. The following instructions describe how to create a <sect1> that contains a <sect2>


Navigating through the document:

If you wish to see how DocBook sections are nested as OpenOffice.org headings, use the F5 key to Display the Navigator window. Expand the headings tag, to display the layout of the headings within the document. You can skip to the start of a given DocBook section/OpenOffice.org heading, by double-clicking on it.

For further information on supported DocBook tags see: Supported Tags

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.