OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Re: including non-xml

On Mon, 26 Apr 2010 16:25:49 -0500, Grant Taylor
<gtaylor@riverviewtech.net> wrote:
> Can you not have all your examples in separate source files?
> You might need a pre-processor to include them together when compiling 
> your source code.  Can you compile your source code as is or are some of

> the sections duplicate?

Sounds like a job for Literate Programming.  Instead of keeping your
source code and examples in external file(s), keep them in your DocBook
document, and extract them automagically to produce the source code in the
programming language.  The implementation that Norm Walsh did several years
back, for an earlier version of DocBook, can easily be adapted to DB5.  It
assumes you only want to get a single source code file out, but could
easily be adopted to allow for extracting ("tangling") multiple output

We're using this for grammars of natural languages; the individual grammar
rules scattered throughout our prose grammar get tangled into an XML
document, which we further process into another target language.  But the
tangled doc can be in any programming language.

   Mike Maxwell

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]