6.2.3 Converting an existing Daisy Wiki site to a book
If you have a site which you would like to publish as a book, and the navigation tree of the site represents the content of the book, you can easily transform the existing navigation tree to a book definition using an XSL, as follows:
- download the existing navigation tree XML in a file: choose the "Go to navigation document" link, right-click on the download link next to "Navigation Description", choose "Save link as" (or similar), and save the file in a directory of your choice and with a name like "navigation.xml" (or whatever).
- similarly, download
- then transform the navigation.xml using the nav2book.xsl. In Linux, if you
have libxslt installed, you can do this as follows:
xsltproc nav2book.xsl navigation.xml > bookdef.xml
There are of course various other XSLT processors you can use, sometimes they are integrated in XML editors. Or you can do the conversion manually.
- Create a new document of type "Book Definition". In the "Book Definition Description" part, copy and paste the content of the bookdef.xml file.
- In the "Book Metadata" part, copy and paste the following:
<metadata> <entry key="title">My Book</entry> <entry key="locale">en</entry> </metadata>
Change the title to something of your choice.
- Now save the book definition.
Optionally, you can edit the siteconf.xml of the Daisy Wiki site and change the content of the <navigationDocId> element to point directly to the book definition (the book definition can serve as a replacement of the navigation tree).
Now you can publish your book as described above under the heading "Try to publish the book".