This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Including code
- To: docbook at lists dot oasis-open dot org
- Subject: DOCBOOK: Including code
- From: Vladimir Ivanovic <ivanovic at parc dot xerox dot com>
- Date: Tue, 03 Jul 2001 17:31:49 -0700 (PDT)
I'm writing a manual that includes many code fragments. The manual has
several chapters that are separate files (see "DocBook:...", p. 30). I
would prefer not to insert the actual code into my DocBook chapters, but
rather just a reference to a file that contains the code. Then I can
include code I know compiles and passes a sanity check.
Currently, the only way I know how to accomplish this is to define some
ENTITYs in the master file which refer to the included code. But ---
here's the ugly part --- the definition is in one file, and the use is
in another. For me it's not too bad because I have only a handful of
files, but I can imagine that in the general case it might be a
nightmare.
Is there any way of including a file without having to change the master
file?
Thanks.
-- Vladimir