dbxml2rst.hooks module

dbxml2rst.hooks

Hooks used by the dbxml2rst library

copyright:Copyright (C) 2017 Markus Heiser
license:GPL V3.0, see LICENSE for details.
dbxml2rst.hooks.hook_chunk_by_tag(*chunkPathes)[source]

Chunk DocBook XML document into XML fragments.

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

dbxml2rst.hooks.hook_copy_file_resource(srcFolder)[source]
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.

dbxml2rst.hooks.hook_flatten_tables(table_id_list=’all’)[source]

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

dbxml2rst.hooks.hook_replaceTag(id2TagMap)[source]