Re: First SVG graphic

Jürgen Purtz <juergen@purtz.de>

From: Jürgen Purtz <juergen@purtz.de>
To: pgsql-docs@lists.postgresql.org
Date: 2018-12-28T18:28:49Z
Lists: pgsql-docs
I failed to generate the "single HTML file".

The default Makefile task, which creates multiple HTML files, works 
properly, because it confines itself to create links to SVG files. The 
SVG structure keeps hidden to the Docbook validation and processing - 
Docbook recognises only some additional links. What I have tried to 
generate a single HTML file is the use of xi:XInclude before validating 
and further processing. In this case the SVG structure is visible to 
Docbook.

In general it is possible to use SVG within Docbook 4.x, if you switch 
the doctype to

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook SVG Module V1.1CR1//EN"
                          "http://www.oasis-open.org/docbook/xml/svg/1.1CR1/dbsvg.dtd"  

This is an Docbook 4.x extension 
(https://docbook.org/specs/wd-docbook-svg-1.1cr1) for SVG-integration. 
But it's only a working draft from 2004, it never reached the status of 
an official OASIS standard. As far as I have seen, it works (with some 
limitations), if the SVG data is an integral part of the xml/sgml source 
file. I failed to combine it with xi:XInclude. In opposite to this the 
combination of xi:XInclude, SVG, and Docbook 5.1 works well. In my 
opinion this results from the fact, that the structure of Docbook 4.x is 
based on a DTD, whereas Docbook 5.x uses Relax-NG (and generates xsd 
files out of rng). DTDs natively are not namespace-aware, you must do 
some trickery to handle namespaces. Docbook 5.x is not only namespace 
aware, it natively includes definitions for SVG and other important 
standards like MathML.

My questions to the community are:

  * Does anyone has an idea how to generate single HTML file in the
    actual situation?
  * Shall we delay the SVG integration until we have switched to Docbook
    5.x? This task is a great step, but it must be done in any case,
    because Docbook 4.x is outdated since many years. Btw: Because of
    other problems (https://github.com/docbook/docbook/issues/74) it is
    likely that we cannot use 5.1 but have to wait for the upcoming
    release 5.2.

Kind regards

Jürgen Purtz


Commits

  1. doc: Add some images