José Matos wrote:
now imagine those regexps where you need to escape all those \"
in conclusion xml will be pain for people trying to use .lyx files
directly with scripts etc.
Clearly you did not had to deal with the lyx file format like I did. :-)
If your idea of a parser is a set of regexp's that is so 80's. ;-)
In fairness, I think he was talking about little hacked scripts to do
the kind of search-and-replace that isn't possible yet in LyX itself. So
you don't really have a parser in that case. Just a very long string. ;-)
This seems to me like the debate between strong and bold. I want to parse the
lyx file on a content based stream, not just a set of lines.
After the change to xml the regularity will still be there with the added
bonus that finally it will be consistent. We took 6 years to clean the lyx
format to a reasonable state and we are still not there yet.
So, Jose, are we ever actually going to do this? If so, then it seems to
me we ought to decide to do it, halt other development for the few weeks
it would take, and do it. I don't think it would really be that hard to
have it working. The existing parser could be tweaked for the short
term. It's already capable of dealing with tabulars, and those are
written as XML already. Longer term, we'd prefer libxml2 or
something---SAX, I assume, rather than DOM---, but that could be done
after the format had stabilized.
Yeah, I know, wrong list.
rh