Approach & Algorithim
For each XML document: Identify mathematical nodes (e.g., <dformula>, <formula>)
Recursively apply templates to every child node within mathematical nodes:
- Look up entities & special characters and Convert to appropriate MathML characters & tokenize (JavaScript)
- Tokenize remaining #PCDATA (JavaScript)
- Convert Postfix markup to MathML (e.g., <sup>, <inf>)
- Re-tag one-to-one transformations (e.g., <sum>, <ul>, <ll>)
Transformed mathematical nodes (<math>) replace original mathematical nodes in document
- Include default namespace attribute