This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: DocBook structure
- To: Shang-Lin Chen <schen at its dot caltech dot edu>
- Subject: Re: DOCBOOK: DocBook structure
- From: David Lloyd <lloy0076 at rebel dot net dot au>
- Date: Sat, 18 Aug 2001 13:09:45 +0930
- Cc: docbook at lists dot oasis-open dot org
- List-Id: <docbook.lists.oasis-open.org>
- References: <Pine.GSO.4.31.0108171754550.877-100000@sue>
Hi!
> can look messy when editing. If I break up the large DocBook file, is
> there
> a way I can make sure the pages are all linked as they were before, or do
> I need to modify the stylesheets?
To do what you want, you'll need something similar to this:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN [
<!ENTITY chapter1 SYSTEM "chapter1.sgml">
<!ENTITY chapter2 SYSTEM "chapter2.sgml">
]>
<book>
<title>A Title</title>
&chapter1;
&chapter2;
</book>
The &chapter1; are called entities. The processor (OpenJade for example)
will replace &chapter1; with the contents of the file "chapter1.sgml" as
though you had actually written their contents in the document.
Therefore, when the processor processes that example, it would actually
process something like this:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN [
<!ENTITY chapter1 SYSTEM "chapter1.sgml">
<!ENTITY chapter2 SYSTEM "chapter2.sgml">
]>
<book>
<title>A Title</title>
<chapter>
<title>Chapter 1</title>
<section>
<title>Section 1</title>
<para>
</para>
</section>
</chapter>
<chapter>
<title>Chapter 2</title>
<section>
<title>Section 2</title>
<para>
</para>
</section>
</chapter>
</book>
In other words, splitting your document into multiple files using entity
references (&chapter1;) won't make a difference to how your document is
processed in the end. It will, as you correctly say, make maintaining
your documentation easier.
DSL
----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>