This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DocBook structure



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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]