John Levon wrote:
>
> On Mon, Aug 06, 2001 at 03:27:53PM +0200, Asger K. Alstrup Nielsen wrote:
>
> > One problem with XML is that a full parser carries a pretty big
> > foot-print along with it, and it also introduces Yet Another
> > Dependency. Finally, no good free C++ XML parsers are really available
> > at this point to my knowledge.
>
> oh, I see. that makes sense ...
>
Yes indeed. I made patches on early 1.1.6 versions using libxml (DOM)
for reading and SAX for output. This lead to code that was easy to
write: basically I would copy the standard read or write method of a
class (inset, paragraph etc.) and reorganize it a bit to use the DOM or
SAX, thus leading to readXML and writeXML methodes.
Using a DOM tree for input really makes things easier with current LyX
code. Of course SAX would be easier if the LyX classes provided good
constructors (the current ones are not meant to build complete objects
since LyX fills the objects with data afterwards (with the read methods
or with methods called due to user operations).
Libxml is a quite big dependency. But I have seen a few new DOM parsers
on freshmeat and sourceforge.
As far of the status of the XML attempt is concerned :
- layout and most insets worked
- configure script was not updated
- formula were not XML-ised at all (It looked a bit harder and
somebody was reorganizing the code : is it over ?)
sincerely,
P.O.