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 the DOM 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.6:

  • RelaxNG validation

  • Presentation MathML export (based on XSLT)

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

The first two require lxml, PyXML does not support them.

Project details


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