[Om3] [project-jomdoc] Brackets

Urs Holzer urs at andonyar.com
Tue Jun 29 13:22:51 CEST 2010


Hi

This also goes to the OpenMath 3 Mailinglist since this concerns the 
nontation definitions at
http://svn.openmath.org/OpenMath/OpenMath3/cd/MathML/

Let me summarise: The notation definitions lack precedence attributes on 
many rendering elements. This means that JOMDoc does not drop fences 
which are not required according to the operator precedence. If you 
render the following Content MathML formula, then all fences are 
included!

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<apply><csymbol cd="arith1">plus</csymbol>
  <apply><csymbol cd="arith1">times</csymbol>
    <ci>a</ci>
    <ci>x</ci>
  </apply>
  <ci>b</ci>
</apply>
</math>

According to Michael, the notation definition I took from arith1.ntn are 
at fault. They have hove no precedence attributes on the rendering 
elements:

Michael Kohlhase wrote:
>   I think that the rendering you are using below does not declare the
> operator precedence.
> It should be something like
> 
>     <rendering precedence="500">
>                ^^^^^^^^^^^^^^^^
>        <m:mrow>
>          <m:mo mcd:egroup="fence" fence="true">(</m:mo>
>          <iterate name="args" precedence="500">
>            <separator><m:mo mcd:cr="fun">+</m:mo></separator>
>            <render name="arg"/>
>          </iterate>
>          <m:mo mcd:egroup="fence" fence="true">)</m:mo>
>        </m:mrow>
>      </rendering>
> 
> 
> Please try this.

Indeed, setting precedence attributes on the rendering elements causes 
JOMDoc to drop the unnecessary fences.

> I am not sure how the rendering elements without precedence
> attributes got into arith1.omdoc, but it was probably a bug in my
> conversion stylesheet.

Actually they are part of the notation definitions from
http://svn.openmath.org/OpenMath/OpenMath3/cd/MathML/
and therefore also of the notation definitions bundled with JOMDoc. Note 
that this problem is not only in arith1.ntn but also in others, for 
example logic1.ntn and relation1.ntn. Unfortunately, I have no clue what 
would be the right precedence values, so I can not provide a patch.

Greetings
Urs


More information about the Om3 mailing list