From: Nicholas Van Weerdenburg Date: 2005-11-13T12:42:48+09:00 Subject: Re: DocBook to PDF On 11/12/05, Hal Fulton wrote: > Keith Fahlgren wrote: > > On Sat, 12 Nov 2005, Hal Fulton wrote: > > > > > > Does this need to be a pure Ruby solution? If not, I'd suggest using (or > > adapting) the standard DocBook stylesheets > > (http://wiki.docbook.org/topic/DocBookXslStylesheets), and using > > (perhaps via the Ruby libxslt bindings) those to generate XSL-FO, which you can > > then feed into FOP (http://xmlgraphics.apache.org/fop/) or the FO formatter > > of your choice. > > That sounds tedious and error-prone to me -- I don't normally use any > of this stuff. And I don't even know what FO is. > > > Alternately, OpenOffice.org can open (and reasonably) format DocBook > > files, and has a built-in PDF printer, and is scriptable via Ruby (though I > > wouldn't necessarily recommend it). > > There doesn't really *need* to be any scripting necessarily. I just want > to be able to reformat the doc in a couple of different ways. > > My OOo, however, doesn't seem to know DocBook. It's probably old (1.1.0) -- > what is the newest one? Or is this some separate plugin? > > > Thanks, > Hal > > > It's a bit tedious to install, but the toolchain is mostly automatic. docbook->doc book xsl-> xsl-fo-> pdf All you reall do is execute the toolchain against the docbook. So, you don't really need to know xslt, xsl-fo, or pdf. Compared to Rexml and PDF::Writer, this is a whole lot simpler. Spend a couple of hours configuring tools, create a batch file or ant script, and you are rolling. Sun had created an Ant tool called pipeline for handling processes much like this. When I looked at it was mostly a concept. Not sure where it went. Interestingly, xsl-fo was the first concept behind xslt (t=transformations) which is used to mangle xml docs from one format to another. During the production of "xsl" they need to general transformations became apparent, so they split xsl into xsl-t (transformations) and xsl-fo (formatting objects). Now everyone uses xslt and xsl-fo is languishing in near obscurity, even though it was the initial impetus behind the whole xsl thing. Regards, Nick -- Nicholas Van Weerdenburg