On 01/30/2013 10:12 PM, Aditya Mahajan wrote:
On Wed, 30 Jan 2013, Bill Meahan wrote:
An XSLT stylesheet would allow direct export of a document from LO-W which could then be be tweaked if necessary.
Another option is to uncompress the odt file (IIUC, it is just a zip), and process it directly in ConTeXt (http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf).
This approach is more flexible than XSLT stylesheets, but it ties you to ConTeXt (with XSLT, in principle, you can switch to other formats relatively easily).
In essence it boils down to understanding the ODT XML Schema and figuring out the mapping to context commands.
I am no expert here, but I have tried this approach a while ago when I was typesetting an edited volume. The authors sent me MS Word files, which I saved as OOO. But the xml in open office was just too messy to deal with. It doesn't provide logical structure, but tries to recreate the visual output, so you get dozens of different <span type="this"> and <span type="that"> elements which may be completely irrelevant. And whenever I thought I had figured out what some cryptic abbreviation (say, <span font="T6">) meant ("italic"), I then learnt that in the next document I opened, it may mean something completely different. I would be interested in finding a fully automated work flow, but I'm somewhat sceptical that it exists. And don't even think about round-trip conversion, I don't think this will be possible. Just my 2 cents. Thomas