This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
including C source files
- From: John Gruenenfelder <johng at bach dot as dot arizona dot edu>
- To: docbook at lists dot oasis-open dot org
- Date: Tue, 02 Apr 2002 14:12:24 -0700
- Subject: DOCBOOK: including C source files
I've written a manual to a small operating system for a satellite (a very
small satellite) using the SGML version of Docbook. When the C source code
for the OS is finished, so will the manual since, after launch, there will be
no way to change it.
I'm including the source in an appendix. In the document's internal subset,
I've declared entities for each source file, like so:
<!entity cubesat-c SYSTEM "../cubesat.c">
Later, in the appendix, I use these entities within a section:
<section id="cubesat.c"><title>cubesat.c</title>
<programlisting>
&cubesat-c;
</programlisting>
</section>
My problem is that the Docbook parser treats the included text as more SGML,
so any occurances of '<', '>', and '&' cause problems. How can I instruct
Docbook to include the contents of the file without having the parser recurse
into it?
--
--John Gruenenfelder Research Assistant, Steward Observatory, U of Arizona
johng@as.arizona.edu
"This is the most fun I've had without being drenched in the blood
of my enemies!"
--Sam of Sam & Max