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

* Re: Inserting a file using <!ENTITY>
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Hugo van der Kooij @ 2001-07-29 22:44 UTC (permalink / raw)
  To: DocBook Mailing List

On Sun, 29 Jul 2001, Stephen Wilhelm wrote:

> 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?

I have included SGML source files in the following way:

<Screen>
<inlinegraphic format="linespecific"
fileref="VoorbeeldBoek.sgml"></inlinegraphic>
</Screen>

I suggest you experiment likewise.

Hugo.

-- 
All email send to me is bound to the rules described on my homepage.
    hvdkooij@vanderkooij.org		http://hvdkooij.xs4all.nl/
	    Don't meddle in the affairs of sysadmins,
	    for they are subtle and quick to anger.

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

* Re: Inserting a file using <!ENTITY>
  2001-07-29 22:44 ` Hugo van der Kooij
@ 2001-07-30 13:30   ` Stephen Wilhelm
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Wilhelm @ 2001-07-30 13:30 UTC (permalink / raw)
  To: Hugo van der Kooij; +Cc: DocBook Mailing List

On Mon, 30 Jul 2001, Hugo van der Kooij wrote:

> On Sun, 29 Jul 2001, Stephen Wilhelm wrote:
>
> > 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?
>
> I have included SGML source files in the following way:
>
> <Screen>
> <inlinegraphic format="linespecific"
> fileref="VoorbeeldBoek.sgml"></inlinegraphic>
> </Screen>

This works great!  By the way, the closing </inlinegraphic> doesn't seem
necessary, and jade complains if it's there.

Thanks a lot for your help.


-- 
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).