How do I visualize a DocBook file? [closed]
Asked Answered
L

4

6

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.

Lazarolazaruk answered 16/5, 2018 at 14:54 Comment(0)
F
2

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)

Fortalice answered 17/5, 2018 at 13:12 Comment(0)
A
2

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.

Ardor answered 16/5, 2018 at 16:52 Comment(2)
Do you know if there is a standard tool or command to perform the conversion? โ€“ Lazarolazaruk
Many DocBook tools are available, but I'd recommend just using an XSLT processor such as Saxon directly with the DocBook XSLT stylesheets. There are many getting started resources. โ€“ Ardor
F
2

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)

Fortalice answered 17/5, 2018 at 13:12 Comment(0)
S
2

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.

Spradlin answered 27/9, 2020 at 21:53 Comment(1)
Probably, you missed some points due to one tiny but crucial aspect here. Usually Docbook/XML contains rich semantic content that could be almost vanished by processing to Markdown by pandoc. And it is not pandoc fault - markdown has very poor set of semantic objects within (i.e. completely lack of guibutton element) and transition from DocBook to Markdown and back could led to losing of valuable data in case rich Docbook based elements have been used. If TC prefer to use lightweight markup languages it would be better instead of Markdown to use asciidoc - semantic equivalent to Docbook. โ€“ Fortalice
K
2

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

Kindergartner answered 7/9, 2022 at 14:49 Comment(0)

© 2022 - 2024 โ€” McMap. All rights reserved.