5

DocBook looks like a really great format for any kind of documentation.

Until you try to read it

Do you know any working online-reader or standalone software (smaller than 500MB, please) to read/preview a DocBook XML file without having to export/save it to another specific format?

HTML preview would be enough.

Kamafeather
  • 8,663
  • 14
  • 69
  • 99

4 Answers4

1

Do you know any working online-reader or standalone software (smaller than 500MB, please) to read/preview a DocBook XML file without having to export/save it to another specific format?

The entire point of DocBook is to serve as a common form for book-like content from which many other formats can be automatically derived.

Choose a format that's suitable, and use one of the many existing stylesheets to convert from DocBook to your targeted format. For example, you might choose HTML/CSS output and use a browser as your viewer. Or, generate PDF and view via Acrobat or hard print copy.

kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • Do you know if there is a standard tool or command to perform the conversion? – Kamafeather Mar 30 '20 at 07:13
  • 1
    Many [DocBook tools](https://github.com/docbook/wiki/wiki/DocBookTools) are available, but I'd recommend just using an XSLT processor such as [Saxon](http://saxonica.com/download/download_page.xml) directly with the [DocBook XSLT stylesheets](https://cdn.docbook.org/). There are many [getting started resources](https://www.google.com/search?q=docbook+getting+started+xslt&oq=docbook+getting+started+xslt&aqs=chrome..69i57.4183j0j4&sourceid=chrome&ie=UTF-8). – kjhughes Mar 30 '20 at 12:14
1

Do you know any working online-reader or standalone software (smaller than 500MB, please) to read/preview a DocBook XML file without having to export/save it to another specific format?

You can use XMLMind XML Editor - Java-based GUI desktop editor - for purpose of view/evaluate your DocBook/XML content. Of course, you can also edit it within this editor in case you need it.

You can use editor for free for individual | non-commercial | evaluating purpose. If you need commercial day-by-day work with DocBook/XML files - the type of license is fully depend on type of using this editor. See complete license types list.

Pitfalls:

  1. Despite XMLMind XML Editor (XXE for short) is a quite complex editor, some features of DocBook/XML standard, due to its nature, can only be fully discovered after processing source files into target formats (i.e.: profiling by multiple bases, highly customized TOCs, complex pagination using XSL:FO, etc.)

  2. Editing in this editor require some time to get familiar with its editing concepts. Due to it is a fully WYSIWYM editor - its editing behavior is quite different from the ordinary WYSIWYG wordprocessing-like editors (MS Word, LibreOffice, Abiword, OpenOffice, etc)

Eduard Tibet
  • 386
  • 1
  • 2
  • 5
1

Use pandoc to convert the docbook file to markdown. Then use the WYSIWYG editor typora to view and or edit the file. Then, if required, use pandoc to convert back to docbook.

XMLMind, mentioned above, is an editor at the XML level, not a WYSIWYG editor. It does, as also mentioned, validate the XML. In the free version, its output to Word format is deliberately corrupted, although the pdf output is fine.

1

You may want to try using the db2html to generate HTML from the Docbook files.

On a Ubuntu Linux, you might need to install these tools with: sudo apt install docbook-utils. On other Linux distributions, use the corresponding commands.

Once you have access to the tools, identify an output directory where you want to HTML files and issue the command:

db2html -o ~/path-to-the-html-files DOCBOOK-FILE

PRouleau
  • 150
  • 6