This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: inserting an external source code example into xml docbook
- From: John Gruenenfelder <johng at bach dot as dot arizona dot edu>
- To: docbook <docbook at lists dot oasis-open dot org>
- Date: Wed, 03 Apr 2002 19:09:46 -0700
- Subject: Re: DOCBOOK: inserting an external source code example into xml docbook
- References: <200204030153.21800.ldelana@libero.it> <3CAAB1E5.3BD0F644@kosek.cz>
On Wed, Apr 03, 2002 at 09:40:21AM +0200, Jirka Kosek wrote:
>Lorenzo Delana wrote:
>
>> <!ENTITY example01 SYSTEM "example01.txt">
>>
>> <para>
>> <example>
>> <title>a little example</title>
>> &example01;
>> </example>
>> </para>
>
>You can use following construct which is handled by both DSSSL and XSL
>stylesheets (you must set parameter use.extensions=1 when using XSL
>ones):
>
><programlisting><inlinegraphic
>fileref="example.txt" format="linespecific"/></programlisting>
>
> Jirka
I tried this with my C source files to include them in an appendix. It
wouldn't work with a fileref... the error was that the file could not be found
(it was there, of course). So I used an entityref instead. This does work
and gives the results I wanted. It does, however, also generate a warning,
the meaning of which I am unclear of:
output is cubesat_manual
Using catalogs: /etc/sgml/catalog
Using stylesheet: /usr/share/sgml/docbook/utils-0.6.9/docbook-utils.dsl#html
Working on: /home/johng/progs/cubesat/docs/cubesat_manual.sgml
jade:/home/johng/progs/cubesat/docs/cubesat_appendixA.sgml:18:10:E:
"cubesatfile" is not a data or subdocument entity
where cubesatfile was declared in the internal subset as:
<!entity cubesatfile SYSTEM "../cubesat.c">
and is being used in the appendix as:
<section><title>Test include - cubesat.c</title>
<programlisting><inlinegraphic
entityref=cubesatfile format="linespecific"></programlisting>
</section>
Can anybody tell me what this means?
--
--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