public inbox for docbook-tools-discuss@sourceware.org
 help / color / mirror / Atom feed
* Inserting a file using <!ENTITY>
@ 2001-07-29 17:31 Stephen Wilhelm
  2001-07-29 22:44 ` Hugo van der Kooij
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Wilhelm @ 2001-07-29 17:31 UTC (permalink / raw)
  To: DocBook Mailing List

Hello everyone.  I have a large document where I insert chapters using
<!ENTITY name SYSTEM "filename"> and I would like to do the same for
perl scripts.  I have tried using

    <programlisting>&program;</programlisting>

but DocBook wants to interpret the "&" characters inside the scripts.  I
can fix this by using a CDATA section like so:

    <programlisting>
    <![CDATA[
        # source code goes here
    ]]>
    </programlisting>

But then I can't use the &program; entity to insert my program.

Basically, I want a way to insert a perl script into the text without
modifying the script, keeping track of two versions of it (the script and
the DocBook version) and without running my DocBook source through a
preprocessor (which is what I'm doing now).

I was hoping that there might be an attribute to programlisting that would
tell it to read in a file, but this feature doesn't seem to exist.  Is
there another way to do this?


-- 
Stephen Wilhelm
    See my Gtk-Perl Tutorial:
    http://personal.riverusers.com/~swilhelm/gtkperl-tutorial/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-30 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-29 17:31 Inserting a file using <!ENTITY> Stephen Wilhelm
2001-07-29 22:44 ` Hugo van der Kooij
2001-07-30 13:30   ` Stephen Wilhelm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).