Skip to main content

MathDOM - Content MathML in Python

Project description

MathDOM - Content MathML in Python

MathDOM is a set of Python 2.4 modules (using PyXML or lxml, and pyparsing) that import mathematical terms as a Content MathML DOM. It currently parses MathML and literal infix terms into a DOM document and writes out MathML and literal infix/prefix/postfix/Python terms. The DOM elements are enhanced by domain specific methods that make using the DOM a little easier. Implementations based on PyXML and lxml/libxml2 are available.

You can call it the shortest way between different term representations and a Content MathML DOM. Ever noticed the annoying differences between terms in different programming languages? Build your application around MathDOM and stop caring about the term representation that users prefer or that your machine can execute. If you need a different representation, add a converter, but don’t change the model of your application. Literal terms are connected through an intermediate AST step that makes writing converters for SQL/Java/Lisp/your-favourite easy.

New in version 0.8:

  • works with (and requires) lxml 2.0 or later

New in version 0.7.2:

  • works with (and requires) lxml 1.3 or later

New in version 0.7.1:

  • bug fix for operator qualifiers

New in version 0.7:

  • works with lxml 0.9 out-of-the-box

New in version 0.6.7:

  • added missing ‘%’ operator (modulo)

  • adapted to updated lxml API

New in version 0.6.6:

  • closer APIs of mathdom and lmathdom

  • convenience functions to portably create apply, ci and cn elements

New in version 0.6.5:

  • XSLT extension function to include literal terms in output

  • bug fix in Python term serializer

New in version 0.6.4:

  • Updated setup.py script to use setuptools if available

  • Support for splitting package into two PyXML and lxml dependent packages

  • Now builds patched lxml during install

New in version 0.6.3.1:

  • Fixes a number of bugs in mathdom and lmathdom modules

New in version 0.6.2:

  • Generalized parser framework

  • Python term parser

New in version 0.6.1:

  • integration of the PyMathML renderer (untested!)

  • more generic integration of XSLT scripts

New in version 0.6:

  • RelaxNG validation (lxml)

  • Presentation MathML export (based on XSLT/lxml)

  • stricter spec conformance (encloses MathML output in <math> tag

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mathdom-0.8.tar.gz (108.3 kB view hashes)

Uploaded Source

Built Distribution

mathdom-0.8-py2.5.egg (174.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page