This is a stylesheet for transforming DocBook 4.5 to http://www.methods.co.nz/asciidoc/[AsciiDoc], originally started by https://github.com/bjepson[bjepson].
== Dependencies
This project has a http://git-scm.com/book/en/v2/Git-Tools-Submodules[submodule] (https://github.com/oreillymedia/docbook2htmlbook). To clone down the repo with the submodule, use the ++--recursive++ flag:
If you don't use ++--recursive++ to clone, you'll need to initialize the subdirectory as a separate couple steps:
To update the submodule from then on, you can either cd into the subdirectory and pull, or you can run this command:
The XSLT is written in XSLT 2.0, so you'll need to run it with an XSLT 2.0 processor. You can use http://sourceforge.net/projects/saxon/files/Saxon-HE/9.2/saxonhe9-2-1-5j.zip/download[Saxon], which is included in this repo.
== Run It
Run a command like this on a consolidated DocBook file to output the AsciiDoc - use either d2a_docbook.xsl or d2a_htmlbook.xsl, depending on your project needs:
If you'd like the AsciiDoc output to be "chunked" into separate files for each preface/chapter/appendix, add the parameter +chunk-output=true+:
Content within
Default value of "bookinfo-doc-name" is "book-docinfo.xml"
=== Other Parameter Options:
== Example
This example shows how to run this script for a subversion repository
First, you have to clone this repo so that you'll have the code.
Second, pull down the repo for the book you want:
Third, make a new directory where the asciidoc files will go:
Finally, run the file command to convert the big docbook file into separate asciidoc files. Note that you'll need Java 1.5 [NEED TO CONFIRM VERSION] or higher. You'll also need to add hardcoded paths to the saxon jar file and to :