Hello,
Last month, I sent an XML processor ( see
http://www.maths-informatique-jeux.com/international/xml_package.tar.gz
) to /Andrej Vodopivec, but I suppose he did not receive my e-mail as I
had no answer. This XML processor is a first step for an implementation
of MathML import/export in Maxima, so I think you will find it
interesting. Here is the mail I sent to him :
/
> Hello,
>
> Some days ago, I looked Paul Wang's package, that imports Content
> MathML to Maxima. It seems to work well for simple cases, but can only
> load a restrictive part of MathML and will generally not be usable. For
> example, if you try to import a MathML file with attributes, xml
> declaration, doctype, comments, CDATA section etc you will get an error
> whereas these contructions could simply be ignored. Another problem
> (that would rather be for Presentation MathML) is the way entities are
> processed. For instance the Maxima object %e can be generated from
> ⅇ &#[decimal value] &#x[hexa value] or even directly from
> the unicode character.
> In order to solve these problems, I made an XML processor (Import
> and Export) for Maxima that can handle a more general syntax. As a
> consequence, it will be usable both for MathML and OpenMath (or any
> other XML document with formulae). For the moment, I haven't tried to
> connect it with the other MathML packages but some changes have to be
> done to make it possible.
>
> ***
> 1) copy the xml directory in /maxima/share/contrib
>
> 2) in /maxima/share/Makefile.am add:
> contrib/xml/xml.lisp\
> contrib/xml/xml_export.lisp\
> contrib/xml/xml_import.lisp\
> contrib/xml/references.lisp\
>
> 3) in /maxima/src/init-cl.lisp add:
> "contrib/xml"
>
> 4) compile Maxima and execute it
>
> 5) load the package with load("xml")$
> ***
>
> I send you two xml files that you can use : mathml.xml and w3c.xml
> I made a function $xml_test(file1 file2) that read file1, build and
> display the tree, then save it to file2.
> For instance, try something like xml_test(?"~/mathml.xml",
> ?"~/mathml2.xml");
>
> Fred