I have looked into XML for another unrelated project recently. It seems
to be the 2nd hottest buzz-thing in IT right now and I can actually
understand why.Correct use of XML solves a lot of problems that
proprietary formats bring and since even the evil empire can agree with
it, it is gonna be here for some time.
I am writing to encourage Andre to continue his work on defining an XML
output for LyX. I would go as far as to say, I would try to organize
some sponsoring, maybe on the user mailing list, for Andre or any one
person who wants to do this. Maybe we can at least get some money
together to buy and send you a book about XML.
But I have one request in any case: Would you please not do any XMLish
stuff. If you go through all this hussle, then please do real XML and
call it that way. It is very well worth it. Everything else will not
find an audience.
Here is why:
1. It would raise LyX visibility in the Linux community but also in the
general free software world enormously. Linux does not have anything
half as usable as LyX for producing XML at current. No, vi does not
count, neither does emacs.
2. It would allow interoperability between KOffice, MSOffice, and LyX as
well as many gnome programs.You could imagine importing Excel tables and
lots of other things as well. It'd be fantastic.
3. XML is not just another file format, it is a meta file format, i.e.
it is much more versatile than Latex or Lyx proprietary formats. It
usually has internally a very simple tree storage structure which could
form a basis for a LyX DOM.
4. XML is, because it is a meta format, very easily extendable. I.e. if
we at some point in LyX developement would, e.g. implement an inset that
plays Beethovens 9'th whenever you look at it, this would not cause any
problem, not even for older versions. Things that arent known arent
shown.
5. Lots of the LyX stuff can, as Andre has shown so nicely, be mapped to
XML in a one to one fashion. Then, there is TeXML which one should look
at for MathED and the ERT stuff.
There are currently a few parser for XML available that are worth
looking at, so the work of actually writing a parser
could be completely avoided and imho it should be completely avoided. In
an OO environement this can nicely be achieved using inheritance but you
know that so much better than I do.
I have collected some URL's on XML and I post them with short comments.
http://xmlsoft.org/
The XML library for Gnome, libxml, a.k.a. gnome-xmlseems to be a
relatively stable and complete implementation. It is written in C and I
dont know whether it depends on glib. It should be reasonably fast and
it is in fact fairly easy to use. Andre could e.g. use it to reread the
documents his output function produces. I do not think that libxml is
currently a validating XML parser but that is not really necessary right
now since we dont have a DTD and writing a DTD is not for the faint of
heart anyway.
libxml is LGPL'ed which is quite important to some of us. It is also
fairly well documented and the project is alive which is just as
important.
The drawback of libxml is that it is written in C, though I read that it
can be used from C++ just as well.
http://www.alphaworks.ibm.com/tech/xml4c?open&l=fm,t=xm4c2
XML for C++ is a validating XML parser from IBM under their IBM public
license but the actual parser is distributed under the Apache public
license. I have not checked this one out as extensively as I was
troubled by the licensing problems but as this is C++ it probably fits
much better with our goals.
http://www.jclark.com/xml/expat.html
expat is another XML Parser Toolkit written in C. it is also real easy
to use and afaik it is the base for the perl modules that deal with XML
found on CPAN.
http://www.bowerbird.com.au/XDBM/
is a database system designed with/for/using XML. These guys do have
some interesting, easy to read documentation
on XML on their website. They have a somewhat quirky license but good
documentation. It's worth a look.
There is currently also a proposal for an XML editor for Linux on either
sourceforge or sourcexchange which means that there is probably some
funding for this available.
There are many good books on XML afaik, There is one from IDG that I
started reading the other night and I thought this is a good reference
with an explanation on the background, the following info is from
fatbrain:
XML Bible
By Harold, Elliotte Rusty
Online Price:
$39.95 Softcover
800 Pages
Published by IDG Books Worldwide
Date Published: 07/1999
ISBN: 0764532367
Again, XML in LyX would be a major step forward and I really appreciate
this effort.
Regards
Roland