W3C home > Mailing lists > Public > www-math@w3.org > March 2006

Re: Technical reasons for some options taken on design of MathML

From: <juanrgonzaleza@canonicalscience.com>
Date: Fri, 31 Mar 2006 06:13:32 -0800 (PST)
Message-ID: <3119.>
To: <www-math@w3.org>

> Mikko Rantalainen wrote:


> I don't know the "official" reason for these constructs but my guess
> is that they follow the logic that <apply> is a function
> application. In programming terms one would convert
> markup such as
>    <apply><plus/><cn>5</cn><cn>8</cn></apply>
> to a computer program
>    plus(5,8)
> where the "plus" is name of the function to call. Apply always takes
> the first child (from DOM tree) as the function to use and rest of
> the childs as parameters for that function.
> If you think that everything is a function, then writing "A/2"
> really seems like a shorthand notation for divide(A,2).

Yes, but what is the technical/conceptual advantage over something like


as a representation of

>    plus(5,8)

In that case you apply the plus function/operation to arguments (tree childs)

In fact, I can read in the initial HTML-3 DTD for math things as


The question is, the MathML choice of something like (please note that
there is not sqrt operator in MathML, but basis for this question is the


over something like


is a pure matter of taste or is there conceptual/technical advantages?

It would be a good thing if some author of MathML explains those issues to

> > - What is the reason for
> >    <msup>base <mrow>index1 index2</mrow></msup>
> > instead of
> >    base<sup>index1 index2</sup>
> > or the
> >    base^{index1 index2}
> The reason the last one isn't used is that it doesn't follow the XML
> way of doing things and (it seems that) W3C has decided to use XML
> for markup of practically everything.

Sorry, I explained badly!

I was not referring to the use of TeX syntax (which is not XML and
therefore omitted in MathML). I was referring to the fact that *base* is
outside of the “sup” tag in both SGML/HTML and TeX. That is, in TeX one
does not write things as

^{base}{index1 index2}

> I guess the reason the first one of the above XML variants is used
> is that it makes it perfectly clear which part the superscript is
> for. Consider the following
>    <mi>a</mi><mi>b</mi><sup><mi>c</mi></sup><mi>d</mi>
> Does that mean "((ab)^c)d" or "a(b^c)d" or something else? Again, if
> you think that XML is *the* way to go, then these design choices
> logically follow. "Everything is a tree".

I do not agree. The MathML syntax is

<msup>base index</msup>

if you have something like


what mean "((ab)^c)d" or "a(b^c)d" or something else? Also MathML syntax
is ambiguous. This is reason that I carefully used an mrow example in my
previous post

<msup>base <mrow>index1 index2</mrow></msup>

Which is not ambiguous. Also, there is not ambiguity with bases outside
since ((ab)^c)d is encoded as


and a(b^c)d is encoded as


in fact similar constructs already existed in SGML world and i fail to
understand why were not reused.

Are there technical/conceptual advantages introducing the base into the
script node or simply a matter of taste?

> --
> Mikko

Juan R.

Received on Friday, 31 March 2006 14:13:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:27:37 UTC