Re: [HACKERS] XML Docbook

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: [HACKERS] XML Docbook
Date: 2003-11-14 19:16:30
Message-ID: Pine.LNX.4.44.0311142008210.5327-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Karel Zak writes:

> On Fri, Nov 14, 2003 at 10:32:10AM +0100, Peter Eisentraut wrote:
> > XML disadvantage:
> >
> > - no arbitrary parameter entities
>
> I unsure if I understand, can you show some example of this problem?

SGML and XML allow you to disable certain parts of your document, by
writing

<![IGNORE[
<stuff>...</stuff>
]]>

The opposite of IGNORE is INCLUDE. Think of this as a preprocessing
stage. You can also make the IGNORE/INCLUDE variable, by declaring a
"parameter entity", think of it as a variable. This is declared like
this:

<!entity % myvar "IGNORE">

Then you can write

<![%myvar;[
<stuff>...</stuff>
]]>

and toggle the myvar somewhere. For example, OpenJade allows you to do
this on the command line.

We use this feature to generate files like INSTALL and HISTORY from the
documentation sources. The files are almost like the corresponding
chapters, but in some cases we use this as a kind of if/then/else to
adjust the content for the different contexts. For example, you cannot
have links in INSTALL, because the rest of the documentation is not there
to link to.

Now, the problem in XML is that it no longer allows arbitary parameter
entities; that is, you can only hardcode IGNORE or INCLUDE, but not toggle
it anywhere. So there is no straightforward conversion path for our
requirements.

If anyone can come up with a good solution for this problem, we can
convert to DocBook XML the next day.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruno Wolff III 2003-11-17 19:00:02 pdf/ps docs for 7.4?
Previous Message Karel Zak 2003-11-14 09:45:48 Re: XML Docbook

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2003-11-14 19:16:56 Re: Help with count(*)
Previous Message Bruce Momjian 2003-11-14 19:11:55 Re: 7.4RC2 regression failur and not running stats collector