OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: How to style db 4.2 html output made with dsssl


Hi,

I'm trying to improve a table of PostgreSQL error codes
in the PostgreSQL docs.

http://www.postgresql.org/docs/devel/static/errcodes-appendix.html
Or for a permanent link:
http://www.postgresql.org/docs/9.2/static/errcodes-appendix.html

The problem is that the various error code classes don't stand
out, the different "sections" of the table need distinguishing
headings.

I wrote a patch to use <tgroup>s for each section of error
codes, but it does not work since the role="style" is not
passed through from the docbook xml source to the generated
html.  The generated html "sub-tables" all have different
column widths and the result looks ugly.
I'm writing here to find out why, what can be done,
and if there's a better approach.

There does not seem to be an %entity-propagates-style%
parameter to set.  So my patch tries to use
%phrase-propagates-style%.

Postgresql uses Docbook 4.2 and openjade/dsssl style sheets.

Postgres uses a perl script to generate, directly from 
the Postgres source, an xml file containing a table of error 
codes.  Then it uses an entity to include the generated
file into the rest of the docs.

Contents of what follows:
  How to work directly with the Postgres source
  Link to my patch
  Link to the Postgres gitweb if you want to
     look directly at the source.

-----------------------<snip>----------------------
Working with Postgres source:  

Among other places, Postgres source can be found at:

ftp://ftp.postgresql.org/pub/source/v9.3devel/
postgresql-9.3devel.tar.gz
  or
git clone git://git.postgresql.org/git/postgresql.git


The short instructions for building the docs are, after unpacking the 
tarball or getting from git:

./configure ;# in the postgresql root directory
cd doc
make

The stuff of interest is:
doc/src/sgml/errcodes.sgml
doc/src/sgml/generate-errcodes-table.pl
doc/src/sgml/stylesheet.dsl
doc/src/sgml/stylesheet.css
doc/src/sgml/Makefile

The interesting make target is: postgres.xml
Another target of interest might be: maintainer-clean

Output can be found in doc/src/sgml/html/

Postgres has extensive documentation on building from source.

Source can be found via:
http://www.postgresql.org/docs/devel/static/install-getsource.html

There is also documentation on the docbook toolsets used:
http://www.postgresql.org/docs/devel/static/docguide-toolsets.html

-----------------------<snip>----------------------
My patch:

Apply with patch -p1 in the pg source root directory.

My patch can be found via my post the the psql-hackers mailing list:
http://archives.postgresql.org/pgsql-hackers/2012-11/msg00188.php

Direct link is:
http://archives.postgresql.org/pgsql-hackers/2012-11/txt3jYwVZ8zRA.txt


-----------------------<snip>----------------------
See the Postgres source on the web:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=tree;f=doc/src/
sgml;h=326bfe3f3c5ad3347a294e14d25b92e70aa2837e;hb=HEAD

-----------------------<snip>----------------------

Thanks for the help.

Regards,

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]