Re: Presentation to Content MathML transform

Hi Karim,

> I am looking at some XSL stylesheet to transform Presentation MathML  
> to
> Content MathML.
> Can anyone provide me such a tool?

As Michael has said, this kind of transformation is not easy to do for  
various reasons. If you can simplify or restrict the context you're  
working in, you may find that things become slightly more amenable.

One thing I investigated recently was trying this kind of  
transformation on very simple Presentation MathML corresponding to the  
kind of basic algebraic expressions you might encounter in UK School  
or early FE/HE mathematics teaching, to investigate possible  
applications for e-Assessment at this level. Working within this very  
restricted domain simplifies the problem significantly, as did working  
solely on the Presentation MathML output of a LaTeX to MathML  
converter (SnuggleTeX) and/or the MathML generated by ASCIIMathML,  
since the resulting "source" Presentation MathML has a fairly well- 
defined structure.

In my case, the conversion was done using a pipeline of two XSLT 2.0  
stylesheets. The first converted the display-oriented Presentation  
MathML into something with a more "semantic" structure, and the second  
then converted this to Content MathML. (A third stylesheet also  
generates linear input format for the Maxima computer algebra system.)

You're welcome to play around with these stylesheets to see if the  
approach might be useful for you. (I found XSLT 2.0 extremely powerful  
here for various reasons. E.g. I could define XPath functions for  
matching certain PMathML constructs, which made the code very  
expressive.)

There are, of course, many caveats and limitations to this approach...!

Some demos:

http://www2.ph.ed.ac.uk/snuggletex/UpConversionDemo (LaTeX input to  
CMathML)
http://www2.ph.ed.ac.uk/snuggletex/ASCIIMathMLUpConversionDemo  
(ASCIIMathML input to CMathML)

More information on the underlying process:

http://www2.ph.ed.ac.uk/snuggletex/documentation/semantic-enrichment.html

Cheers,
David.

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Received on Friday, 14 May 2010 13:22:05 UTC