When dealing with a function or an operator in mathematics, it is important that its scope is well defined. MathML and OpenMath both specify the scope of an operator by enclosing it with its arguments inside opening and closing tags. In MathML, the opening and closing tags <apply> are employed, and in OpenMath one uses the opening and closing tags <OMA>.
However, OpenMath's grammar as it is defined in the OpenMath standard in section 4.1.2 can produce OpenMath objects where the scope of an operator is ambiguous, in which case a parser would have great difficulties validating the syntax for translation. Let us illustrate this problem with the two OpenMath expressions in figure 3.1 which are grammatically correct.
Example 2 demonstrates how the use of <OMA>
tags help define
clearly the scope of each operator. A parser can then without
difficulty interpret the expression and translate it correctly. Example
1, on the other side, shows how insufficient use of <OMA>
tags
can lead to ambiguous expressions both for automatic parsers and
humans.
MathML is stricter when defining the scopes of operators. Every
operator must be enclosed with its own <apply>
tags. This
difference between both standards is source of problems. The expression
in Example 1 does not allow the scopes of the operators to be
determined with accuracy, and so an equivalent MathML expression cannot
be produced.
When developing an OpenMath/MathML translator, it is important to
specify that operator scopes in OpenMath must be accurately defined, or
else translation to MathML is not possible. The use of <OMA>
tags must be imposed.