[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Re: including non-xml
On Mon, Apr 26, 2010 at 11:26 PM, maxwell <maxwell@umiacs.umd.edu> wrote: > 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. I can see how that could work in some simple cases. For anything other than trivial programs, the edit-compile-run cycle would be very small because of the inability to use an IDE or edit the source code directly. > 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 > files. > > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > -- Ivan Ristic ModSecurity Handbook [http://www.modsecurityhandbook.com] SSL Labs [https://www.ssllabs.com/ssldb/]
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]