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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 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


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