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: OT: DocBook and Literate Programming?


On Thu, 29 Jun 2000, Jeff Duska wrote:

> I know that this topic is some times called Literate Programming. With the
> power of DocBook it seems like this might be a match made in heaven. My
> deliverables need to be HTML, PDF, RTF and, of course, the VB source code.
> It would be nice, if I could some how keep everything together and in sync.

Literate Programming usually works the best when the programming language
used, allows for preprocessing the source code (like the C preprocessor),
since it is very painful to debug such programs if the system does not
refer back to the original document rather than the generated source
code.

The origin of Visual Basic taken in consideration I would expect that this
is not currently possible, so what you might find usable is placing your
documentation in the source file inside comments, and then write a
small program which embed actual code in <programlisting> tags, and remove
the visual basic comments around the DocBook markup.  The resulting XML
(the easiest these days to work with) could then be rendered by applying
the appropriate style sheet.

Good luck,
-- 
  Thorbjørn Ravn Andersen               "...plus...Tubular Bells!"
  http://www.mip.sdu.dk/~ravn

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