Refactor the generation of docbook data

Avoid duplicated data (mainly headers and footers for table files).

Also reformat the generated output to avoid having too much white
spaces.

Change-Id: Ib7ff29ae6d3180a401c5cac482e82a56997751a7
Merge "Refactor the generation of docbook data"