next up previous contents
Next: Differences in Structure Up: Elements and Functions Previous: Elements and Functions   Contents


The Scope of Symbols

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.

Figure 3.1: The importance of defining scopes
\begin{figure}
\par\begin{tabular}{ l l }
\par {\bf Example 1} & {\bf Example 2}...
...OMA>\vert \\
&\verb*\vert</OMOBJ>\vert \\
\par\end{tabular}
\par\end{figure}

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.


next up previous contents
Next: Differences in Structure Up: Elements and Functions Previous: Elements and Functions   Contents
root
2000-05-01