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


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: inserting an external source code example into xml docbook


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


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