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]

Re: external programlistings


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?


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