I'm creating an app where I keep the MathML in Content form and then
use the following XSLT to convert it to presentation:
http://jeuclid.sourceforge.net/content.html
I load the MathML as an XML document at run time and use the following
jQuery XSLT plugin to convert it:
http://www.xslt-templater.com/
Finally, I queue up a rendering of the Presentation MathML after it
has been properly translated. So far, this has been working well.
Here's what some sample code looks like.
(document).ready(function(){
$.ajax({
url: "mathmlc2p.xsl",
dataType: "xml",
success: function(xml) {
mathmlc2p = xml;
}});
$.ajax({
url: "reference.mml",
dataType: "xml",
success: function(xml) {
referenceData = xml;
}});
...
$("div.leftbutton").click(function(){
$("#ContentDisplay").xslt(referenceData, mathmlc2p);
MathJax.Hub.Queue(["Typeset",MathJax.Hub, "ContentDisplay"]);
});
...
Hope that helps.
::Amir