This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Re: ProgramListingCO bugs on "linespecific image"text files ?
- From: Peter Eisentraut <peter_e at gmx dot net>
- To: Yann Dirson <ydirson at fr dot alcove dot com>
- Cc: Docbook Apps list <docbook-apps at lists dot oasis-open dot org>
- Date: Thu, 14 Feb 2002 14:48:02 -0500 (EST)
- Subject: Re: DOCBOOK-APPS: Re: ProgramListingCO bugs on "linespecific image"text files ?
Yann Dirson writes:
> > There are many chars special to sgml in this file, so a simple general
> > entity doesn't work. Is there some way to declare a general entity to
> > take a file's content as raw CDATA ?
>
> I additionally tried the following, which does parse, but does not
> output the file's contents:
>
> <!ENTITY adjust-dll SYSTEM "../src/adjust-dll" CDATA linespecific>
To include program text with funny characters into DocBook, I use the
following:
<!ENTITY test SYSTEM "something.c">
...
<programlisting>
<![RCDATA[&test;]]>
</programlisting>
This will paste the contents of the file (with all the funny characters
magically translated to character entities) during parsing, before
formatting, so all the stylesheet features, such as line numbering,
callouts, etc. work. This is unlike the <inlinegraphic entityref="...">
solution, where substitution happens during formatting.
--
Peter Eisentraut peter_e@gmx.net