Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DocBook to Word Conversion?

I need some help with conversion of DocBook files to Microsoft Word files.

Do I need an XSL file for the transformation?

like image 268
rudimenter Avatar asked Jun 09 '11 14:06

rudimenter


1 Answers

Yes, you do need an XSL file. You can get XSL files for DocBook from the free DocBook XML distribution. Then, you run a free XSLT transformer such as Saxon. If you run Saxon from a command line, you give it the name of your DocBook file, and the name of one of the stylesheets, and it will transform your file according to the rules in the stylesheet.

What you need to do to transform to Word, is to pick the right stylesheet.

From DocBook XSL: The Complete Guide, here are three possibilities:

  • Convert to XSL-FO and then use the XMLmind to export to Word. See the XMLmind website for more information.
  • Use a limited set of tags and then use one of DocBook XML's included stylesheets to output to WordML.
  • Try to use Jfor to output to RTF, although Jfor no longer appears to be maintained.

And I have one of my own:

  • As above, use one of DocBook XML's included stylesheets to publish to XSL-FO, then run Apache FOP to convert from XSL-FO to RTF. You will lose the structural information, but you will keep a certain amount of the formatting.
like image 78
martin jakubik Avatar answered Sep 24 '22 03:09

martin jakubik