[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Tools for generating Docbook programlisting fragments?
> Do anyone know of a library for generating DocBook programlisting > fragments from > source code listings marked up with special comments. > The purpose is to generate the Docbook source and program language > source, > from a common specification. I've tested filtering a xml file containing > a programlisting > DocBook element through a custom stylesheet, but so far I've been unable > to avoid > getting extra whitespace, when doing it this way. Hi, Tommy, One of my clients is doing this against a code base that consists of C, C++, Java, and Visual Basic (they program in C++ and Java but expose APIs in all four languages). They have a program that scans their source code directories, scoops up the specially marked code listings (everything from one-line listings to entire executables), and dumps it all into an XML (DocBook) file. Then the writers create references to the file full of samples to scoop up the bits that go into about 40 different books. I can't share the code (they wrote their own proprietary solution), but I could write such a program in an afternoon (including testing). I helped them with the XML/XSLT part of setting up their DocBook system, so I know the issue well and know that this solution works. If you're generating source code listings with XSLT, by the way, try setting the output mode to text and being very careful with the line breaks and start-of-line spacing. You can still save the resulting files as XML, but you'll get better control over the white space if you create the output as text. HTH Jay Bryant Bryant Communication Services
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]