next up previous contents
Next: Bound Variables Up: Differences in Structure Previous: Differences in Structure   Contents

Selector functions and Matrices

Let us first look at: matrices, selection from a matrix and selection from a vector. These elements exist in both recommendations, but differ syntactically.

Selection from a matrix and from a vector is done by the <selector/> element in MathML and by the symbols vector_selector and matrix_selector in OpenMath. Because MathML uses the same element to deal both with matrices and vectors, it is necessary for the parser to determine what the arguments of the expression are before finding the correct equivalent OpenMath. If the expression has a matrix as argument, then matrix_selector is the correct corresponding symbol. If the argument is a vector then the corresponding symbol is vector_selector.

It is important to note as well the order of arguments. The MathML <selector/> tag first takes the vector or matrix object, and then the indices of selection. In OpenMath it is the other way around. First the indices of selection are given and then the object.

Another element where differences in structure are important is the matrix element. OpenMath has two ways of representing matrices. One representation defined in the "linalg1" CD and the other defined in the "linalg2" CD. A matrix is defined as a series of matrixrows in "linalg1", exactly as in MathML. For such matrices, translation is straightforward.

However, "linalg2" defines a matrix as a series of matrix columns. This representation has no equivalent in MathML. It is important that a translator is capable of understanding both representations in order to offer correct translation.

When dealing with a "linalg2" matrix, a procedure can be implemented which given the matrix columns of a matrix, returns a series of matrix rows representing the same matrix. From these matrix rows, a MathML expression can be generated.


next up previous contents
Next: Bound Variables Up: Differences in Structure Previous: Differences in Structure   Contents
root
2000-05-01