discuss: Maintaining program listings
Subject:
Re: Maintaining program listings
From:
Alexander Bartolich ####@####.####
Date:
24 Jun 2002 08:51:15 -0000
Message-Id: <12356.1024908644@www51.gmx.net>
Pradeep Padala:
> [...] I want to maintain them as seperate .c files
> and include them in my sgml file.
> [...]
> <!ENTITY hello SYSTEM "hello_world.c">
Very bad idea. Entities of this type will be
interpreted as SGML source. The very first
#include <...
will break. Same for
if (a && b)
or
strtol(&endp,
The correct way is to include the text file as an "image"
of type linespecific. Preferred way changed through DocBook
versions. AFAIK the modern way is this:
<programlisting><inlinemediaobject><imageobject>
<imagedata format="linespecific" fileref="odbc/txt/oodbc.txt">
</imageobject></inlinemediaobject></programlisting>
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net