dbxml2rst.hooks module


Hooks used by the dbxml2rst library

copyright:Copyright (C) 2017 Markus Heiser
license:GPL V3.0, see LICENSE for details.

Chunk DocBook XML document into XML fragments.

Requirement for the division is an ID (e.g. <chapter id="intro" ...)

dbxml2rst.hooks.hook_drop_usless_informaltables(node, _rstPrefix, _parseData)[source]

Hook to convert useless informatables to (e.g) paragraphs

dbxml2rst.hooks.hook_fix_broken_tables(fname_list=None, id_list=None)[source]

This hooks add missing colspecs to the broken table.

A complete colspec definition is needed by pandoc, otherwise the build of the ASCII-art table fails within pandoc.


Hook to convert tables into a double-stage list.

This hook converts a tables (by id or “all”) into the flat-table directive

dbxml2rst.hooks.hook_html2db_table(node, rstPrefix, parseData)[source]

This hook converts a HTML table to a DocBook table

This is done by simply change <tr> and <td> (<th>) tags to <row> and <entry> tags