From: James Britt Date: 2003-09-30T00:04:50+09:00 Subject: Re: Martin Fowler and Ruby Gour wrote: > James Britt (jamesUNDERBARb@seemyemail.com) wrote: > > >>I wrote an article on how I used REXML's stream parser to populate >>templates from an MXL dccument: >>http://www.rubyxml.com/articles/REXML/Stream_Parsing_with_REXML > > > Thanks. Nice reading. Thanks. > > What do you think about using the same technology for transforming DocBook > documents into Latex-like ones? I'm not that familiar with Latex, but from what I understand it should be quite doable. The difficulty may reside in how much (or little) the two formats map to each other. In Rimport I use a somewhat different approach (perhaps similar to what Fowler describes) where the code manually walks the tree, passing elements and subtrees off to dynamically-invoked methods based on element name and context. This may give you better control that straight stream parsing, plus it saves you the trouble of having to build your own subtrees. James Britt james_b AT neurogami DOT com > > Sincerely, > Gour >