discuss: XML template
Subject:
Re: XML template
From:
David Lawyer ####@####.####
Date:
1 Oct 2001 15:15:51 -0000
Message-Id: <20011001081542.B462@lafn.org>
On Thu, Aug 30, 2001 at 05:53:11PM -0400, Hal Burgiss wrote:
> On Wed, Aug 29, 2001 at 07:27:34PM -0400, Hal Burgiss wrote:
>
> > Now I get a brainstorm that since I know Redhat pretty well, and
> > Redhat based distros probably have a big chunk of the market, then
> > to do a related doc called Security-Quickstart-Redhat, or whatever
> > with some real step-by-step at each stage. The changes would be
> > overall pretty minor. But now this is two docs, that have much
> > duplication. How can I do conditional inclusion/exclusion?
> >
> > #ifdefine $redhat
> > <text>
> > #else
> > <other text>
> > #endif
One way to do this is with the m4 preprocessor. I use linuxdoc, but it
would be about the same for docbook. Example:
see the section
m4_ifdef( MODEM_ ,
'" "What are UARTS" in the Serial-HOWTO. "')
m4_ifdef( SERIAL_ ,
'"<ref id="uart_" name="What Are UARTS?"> "')
Here's an implied "else" after the , (the Serial-HOWTO: ...)
See m4_ifdef( SERIAL_ , '"section <ref id="pinout_" name="Pinout and
Signals">"', '"the Serial-HOWTO: Pinout and Signals"') for more
details.
What does this look like in docbook? The examples I've seen for
docbook don't deal just with a part of a sentence like the above.
David Lawyer