docbook

Edward Glowacki glowack2@msu.edu
Wed, 7 Mar 2001 12:53:33 -0500


On Wed, Mar 07, 2001 at 12:39:42PM -0500, Marcel Kunath wrote:
> There is a lot of stuff out there but there isn't a great introduction on how
> to use docbook properly. I read the o'reilly book but even its examples
> wouldn't work for me. if anybody can point me to some simple examples which
> work I'd appreciate it.
> 
> Ok I got file with this in it:
> 
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
>        <chapter><title>Test Chapter</title>

I don't think "chapter" is a valid DocBook DOCTYPE.  IIRC, you have
a choice of "book" or "article".  If you want to separate chapters
into their own files, you have to include them in the book/article
somehow, but you can't have the <!DOCTYPE> line in there.

For example, here's part of one of my SGML files:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY overview SYSTEM "overview.sgml">
<!ENTITY hardware SYSTEM "hardware.sgml">
]>

<book>

<!-- stuff in here removed -->

&overview;
&hardware;

</book>

There are a couple of ways to include files, this just happens to
be the one I chose at the time for reasons I have forgotten.
Basically you create an ENTITY called overview, which exists in
the SYSTEM as a file called "overview.sgml".  You include that
entity with &overview; in the body of your SGML doc.

The first line of "overview.sgml" is "<chapter>" and the file ends
with "</chapter>".

-- 
Edward Glowacki			glowack2@msu.edu
Michigan State University