This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: external programlistings
- To: Dave Makower <davemak at iclick dot com>
- Subject: Re: DOCBOOK: external programlistings
- From: Stephane Bortzmeyer <bortzmeyer at pasteur dot fr>
- Date: Wed, 29 Mar 2000 11:18:37 +0200
- Cc: docbook at lists dot oasis-open dot org
- Reply-To: docbook at lists dot oasis-open dot org
On Monday 27 March 2000, at 20 h 17, the keyboard of Dave Makower
<davemak@iclick.com> wrote:
> I currently have a document that uses a programlisting with a CDATA
> section inside it containing the sample program. It's a CDATA
> section because the program contains characters that would invalidate
> the markup if they weren't escaped.
>
> However, I'd like to have the program reside in an external file,
> say, "Tutorial1.java".
I would use an external processor like M4. Let's try this to still be able to edit it with SGML tools:
<![CDATA[
include(`Tutorial1.java')
]]>
then, 'm4 myfile.xml > myfile2.xml', then normal processing. But the lack of macros in SGML/XMl is a real limit here, you cannot program your own element "programsource".
May be in the stylesheet (DSSSL or XSL), as suggested?