On Tuesday 22 July 2008 19:24, Pavel Sanda wrote: > > Pavel Sanda wrote: > > Moreover, if you're editing by hand, you can use > > something that recognizes XML. > > of course it will work, but it will take x-times more time. > quite difference to write sed one-liner or start doing some > xslt templating. > > pavel
Hi Pavel, Perhaps our best hope of continuing tweakability of native LyX is to create 1.5.x to XML and XML to 1.5.x converters. Then all the parsing/tweaking can continue to be done in the 1.5.x format. I'm presuming that the LyX developers will create the 1.5.x to XML converter so users can upgrade their old docs, and hopefully they would keep that converter updated for each new LyX version, so that you and I wouldn't need to worry about coding the 1.5.x to XML. The only thing you and I would have to do is the XML to 1.5.x converter. I'm pretty darned good with C, and if necessary I can do C++ (but with a C accent). If we pick an XML parser with full schema/dtd capability, that doesn't have many dependencies, then if you know how to write 1.5.x, I can feed you whatever data is needed to write the 1.5.x. There's another possibility that I think might be better. Using Ruby with REXML, I could convert the XML to YAML (http://en.wikipedia.org/wiki/Yaml) if you could help me just a little bit with the return trip (YAML to XML). I think this would be EVEN BETTER than 1.5.x, because YAML was made for exactly what you and I want to do -- parsing with awk/sed/perl/grep/cut. It would also remove our responsibility to support 1.5.x syntax in the 22nd century. Using YAML for tweaking, I think there may come a time when you and I would say "remember when we had to parse that nasty 1.5.x?" I can begin this project as soon as the developers give me an XML def and an XML file. That way, once they actually specify what they're going to do, we'll have the technology for the XML->YAML->XML round trip, and only the details will require coding. What do you think? StevET Steve Litt Recession Relief Package http://www.recession-relief.US
