"Unknown node type: apply" ?

1,417 views
Skip to first unread message

laurent...@gmail.com

unread,
Nov 13, 2012, 5:24:54 AM11/13/12
to mathja...@googlegroups.com
Hello,

I began testing MathJax few days ago for our image generation replacement, and first results are really nice.
But now I'm facing a real issue : on some equations I get a MathJax error : "Unknown node type: apply", though the MathML passes the W3C Validator.
Here is the MathML :
<math><apply><eq/><apply><plus/><apply><divide/><ci>a</ci><ci>c</ci></apply><apply><divide/><ci>b</ci><ci>c</ci></apply></apply><apply><divide/><apply><plus/><ci>a</ci><ci>b</ci></apply><ci>c</ci></apply></apply></math>
I try replacing the "<tag/>" by "<tag></tag>" but it didn't help.

Any idea ?
Thanks ;)
Laurent

Davide P. Cervone

unread,
Nov 13, 2012, 5:35:35 AM11/13/12
to mathja...@googlegroups.com
MathJax only handles Presentation MathML not Content MathML. The
usual approach to handling Content MathML is to use XSL
transformations to convert it to Presentation MathML and have MathJax
process that. This has come up before in this forum, so you could
check out

https://groups.google.com/d/topic/mathjax-users/RkuwoJjb0Og/discussion

for some suggestions and an example of how one person solved the
problem.

Davide



On Nov 13, 2012, at 5:24 AM, <laurent...@gmail.com> <laurent...@gmail.com

Frédéric WANG

unread,
Nov 13, 2012, 5:41:55 AM11/13/12
to mathja...@googlegroups.com
Hi Laurent,

How did you generate this MathML code? It is content MathML but MathJax
only supports presentation MathML at the moment, so you'd better you
this latter version. Note that I've recently written an add-on for
Firefox, based on David Carlisle's ctop.xsl:

https://addons.mozilla.org/fr/firefox/addon/mathml-ctop/

which converts from content MathML to presentation MathML. When I tested
it, the conversion seemed to run before the MathJax code, so MathJax is
then able to render the presentation MathML. Unfortunately, there is no
versions for other browsers and you probably don't want to ask your user
to install the add-on.

The MathPlayer plug-in for Internet Explorer is also able to render
content MathML.

--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic

Laurent POLESE

unread,
Nov 13, 2012, 5:57:42 AM11/13/12
to mathja...@googlegroups.com
Hi Frederic,

thanks for this, but I need this to work on (almost) any browser, and
without any plug-in needed. That's why I'm interested by MathJax indeed.
For the record, the MathML was generated by Design Science's MathFlow
SDK. A quite old version of it actually.

Laurent
Message has been deleted

Laurent POLESE

unread,
Nov 13, 2012, 6:05:34 AM11/13/12
to mathja...@googlegroups.com
On 13/11/2012 11:35, Davide P. Cervone wrote:
MathJax only handles Presentation MathML not Content MathML.  The usual approach to handling Content MathML is to use XSL transformations to convert it to Presentation MathML and have MathJax process that.  This has come up before in this forum, so you could check out

    https://groups.google.com/d/topic/mathjax-users/RkuwoJjb0Og/discussion

for some suggestions and an example of how one person solved the problem.

Davide



On Nov 13, 2012, at 5:24 AM, <laurent...@gmail.com> <laurent...@gmail.com> wrote:

Hello,

I began testing MathJax few days ago for our image generation replacement, and first results are really nice.
But now I'm facing a real issue : on some equations I get a MathJax error : "Unknown node type: apply", though the MathML passes the W3C Validator.
Here is the MathML :
<math><apply><eq/><apply><plus/><apply><divide/><ci>a</ci><ci>c</ci></apply><apply><divide/><ci>b</ci><ci>c</ci></apply></apply><apply><divide/><apply><plus/><ci>a</ci><ci>b</ci></apply><ci>c</ci></apply></apply></math>
I try replacing the "<tag/>" by "<tag></tag>" but it didn't help.

Any idea ?
Thanks ;)
Laurent

Thanks Davide, I didn't know this limitation. 
I'll check it out.

Laurent

Frédéric WANG

unread,
Nov 13, 2012, 6:18:18 AM11/13/12
to mathja...@googlegroups.com
On 13/11/2012 11:57, Laurent POLESE wrote:
> Hi Frederic,
>
> thanks for this, but I need this to work on (almost) any browser, and
> without any plug-in needed. That's why I'm interested by MathJax indeed.
> For the record, the MathML was generated by Design Science's MathFlow
> SDK. A quite old version of it actually.
>
Perhaps you'll be able to use MathFlow or any Design Science''s product
to generate presentation MathML at the end, rather than content MathML.
Otherwise, I guess you'll have to use one of the XSLT stylesheet
mentioned in the thread indicated by Davide.

--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic

Laurent POLESE

unread,
Nov 13, 2012, 6:24:01 AM11/13/12
to mathja...@googlegroups.com
On 13/11/2012 12:18, Frédéric WANG wrote:
> Perhaps you'll be able to use MathFlow or any Design Science''s
> product to generate presentation MathML at the end, rather than
> content MathML. Otherwise, I guess you'll have to use one of the XSLT
> stylesheet mentioned in the thread indicated by Davide.
>
Actually I'd like to leave Design Science tools, as I'm not really
convinced by them.
But we have some (as over 56K ;)) old equations which MathMl was
generated by MathFlow. Weird thing is that only a few of them are in
C-MathMl.
Anyway I need to have them work, I'll try with XSLT stylesheet.

Thanks

yu.yi...@gmail.com

unread,
Nov 26, 2012, 12:18:39 AM11/26/12
to mathja...@googlegroups.com, laurent...@gmail.com
it's nic e trial
 

laurent...@gmail.com於 2012年11月13日星期二UTC+8下午6時24分54秒寫道:
Reply all
Reply to author
Forward
0 new messages