[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] HTML -> DocBook Conversion?
Dave Pawson <dpawson@gotadsl.co.uk> writes: > At 05:48 05/10/2004, Michael Smith wrote: > > > >If you're just working with Frame 6, you can > > > > 1. Convert the file to Frame's XML format (but to get it work > > correctly, you need to do it using dzbatcher or fmbatch -- > > Are these Frame tools Mike? fmbatch ships with the Unix versions of Frame. dzbatcher is third-party freeware, available for Windows as well as Unix - http://www.datazone.com/dzbatcher2.html They both basically do the same thing: allow you to automate conversion of Frame files (to HTML and PDF and text as well as XML). But a limitation in using both of them is that Frame itself requires an X server in order to do anything. So you can't really use either of them in a server environment unless it has an X server running (or at least a virtual X server, like Xvfb). > > using "Save as XML" from within Frame itself corrupts an XML > > mapping table within the document) > > > > 2. Write an XSL stylesheet and use it to convert the Frame XML > > to DocBook. > > I'd be surprised if no one has done this already, Frame is > pretty widespread in usage isn't it? Well, it's not that no one has done it already, it's that basically all that Frame does is take the names of the paragraph and character formats in a document and use those as the tag names in the XML output. And because in Frame you create paragaph and character formats using any arbitrary names you want, and have any sort of "structural" relationship between those that you want, there is not way to write a single XSL stylesheet that could be used to convert _any_ Frame XML file to DocBook. Anyway, for what it's worth, the stylesheet that I created is attached and also at: http://sideshowbarker.net/docbook/freshmaker/freshmaker.xsl Its specific purpose is for conversion to DocBook Refentry format. So it works only on a very narrow class of source documents. But maybe some of what's in there is general enough that it could be repurposed for other things. Also, one big caveat of this whole thing is that the Frame "Save as XML" (and dzbatcher automation of that) doesn't preserve all information in your source -- if I remember right, it just saves the main text flow, but not things like the content of index markers (which don't show up in the actual text flow). > >I guess that would all be overkill if this is just a one-time > >Frame -> DocBook conversion you want to do with just one > >particular file. But if it's something you have an ongoing need > >for, you might want to invest some time in getting it set up. > > Certainly worth adding to the faq Mike! Please do, DocBook brother. :-) --Mike
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]