From: Stephen Wilhelm <swilhelm@theriver.com>
To: DocBook Mailing List <docbook-tools-discuss@sourceware.cygnus.com>
Subject: Inserting a file using <!ENTITY>
Date: Sun, 29 Jul 2001 17:31:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.33.0107291729560.21482-100000@vorlon.theriver.com> (raw)
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/
next reply other threads:[~2001-07-29 17:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-29 17:31 Stephen Wilhelm [this message]
2001-07-29 22:44 ` Hugo van der Kooij
2001-07-30 13:30 ` Stephen Wilhelm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.33.0107291729560.21482-100000@vorlon.theriver.com \
--to=swilhelm@theriver.com \
--cc=docbook-tools-discuss@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).