DocBook to WordML

The DocBook project on SourceForge provides XSL stylesheets to produce a number of output formats from DocBook source documents, such as HTML and PDF. Engineers at Zveno have produced an XSL stylesheet to convert a DocBook document into a MS Word doucment - this is done by transforming into WordML, MS Office 2003's XML format.

Our aim is to develop the stylesheet to more fully support the DocBook element set, and to have the stylesheet included in the DocBook SourceForge project. We also plan to support the Open Office XML format. In addition, we are intending to develop an XSL stylesheet system to convert WordML (and/or Open Office) into (structured) DocBook. This will allow "round-tripping" of documents between Word/Open Office and DocBook, meaning that Word or Open Office may be used as an authoring tool for DocBook.

Download

Version 0.1 of the XSL stylesheet is available for download. It is available under the same licensing conditions as the DocBook XSL stylesheets (ie. it is open source).

This stylesheet should be considered as an alpha release. See below for limitations of the software.

Limitations

This is an initial release of the stylesheet. It is very limited in the DocBook features it supports. Our aim is to develop the supported features until most DocBook elements are supported.

There is a natural limitation to what DocBook features may be supported. MS Word/Open Office documents have a very flat structure and it will be difficult to represent deeply nested, recursive DocBook structures - but we will try!

Currently supported features:

  • Toplevel: book, article

  • Metadata: title, subtitle, titleabbrev

  • Divisions: section

  • Block-level: para, blockquote, table, informaltable, itemizedlist, orderedlist

  • Inline-level: emphasis

Usage

Use your favourite XSL transformation engine (eg. tkxsltproc), with a DocBook document as source and the wordml.xsl stylesheet. The result is an XML document that MS Word 2003 will be able to open (even by double-clicking). The template parameter is mandatory, see below.

The template parameter is required: it is the filename of a WordML document. The stylesheet copies header information from this document, but ignores its body (ie. the content). The purpose of this document is to define all of the paragraph and character styles used by the XSL stylesheet, and allowing the styles to be easily changed. A sample template document is provided. The following styles must be defined:

  • booktitle, booksubtitle, booktitleabbrev

  • articletitle, articlesubtitle, articletitleabbrev

  • sectiontitle, sectionsubtitle, sectiontitleabbrev

  • blockquote


Copyright © 1998-2004 Zveno Pty Ltd. All rights reserved. ABN 64 074 383 163. Legal notices. Comments or questions about this website? Contact the Zveno webperson.