[om] A Proposal for extending OpenMath with XML annotations

Stephen Watt watt at scl.csd.uwo.ca
Mon Aug 12 23:27:25 CEST 2002

Dear OpenMathers,

One of my students -- Clare So -- and I are working on a complete 
implementation of the Content-MathML//OpenMath correspondence as a set of
XSLT stylesheets.   Some previous work had provided a good start,
but there are many tricky details which emerge.

In particular, when translating a MathML <semantics> element to OpenMath
it would be natural to use an <OMATTR>.  However, the <OMATTP> objects
must have valid OpenMath data as their values.   

We need to be able to include non OpenMath XML in an OpenMath object.

[ From a forward-looking perspective, we see that it will be important to
  be able to include XML data from other sources, not just MathML, in 
  OpenMath objects.   The approach of the "altenc" cd is too primitive
  (converting the XML to strings, e.g. "&lt;sin/&gt;") because it
  does not allow tools to manipulate the XML data. ]

We see two possibilities to handle this:  

(1) the cleanest would be to invent a new element <OMXML> 
to enclose arbitrary XML data as an OpenMath object (much like OMS 
for character data).

(2) the "backward-compatible" possibility would be to expand the
definition of <OMATTP> attributions to allow arbitrary xml data as
the attribute values.

**** Question 1 ****  Which of these, or what instead, do people prefer?

To not destabilize our tools, we would prefer method (2).

Recall that an OpenMath attribution object has the form

   <OMATTR> <OMATTP> S_1 O_1 S_2 O_2 ...</OMATTP>  E </OMATTR>

where the S_i keys are <OMS> values and the O_i are arbitrary OpenMath objects.

We would propose that:

    If an OMATTP has an OMS key S_i with cd="xml", 
    then the value O_i can be an arbitrary XML object.

    In this case the name="...." field of the OMS can be used to
    capture other information.

E.g.  The MathML content element

      <apply> <sin/> <cn>1</cn> </apply>
      <annotation-xml encoding="MathML-Presentation">
        <mrow> <mo>sin</mo> &ApplyFunction; <mn>1</mn> </mrow>

could be encoded ase

         <OMS cd="xml" name="MathML-Presentation"/>
         <mrow> <mo>sin</mo> &ApplyFunction; <mn>1</mn> </mrow>
      <OMA> <OMS cd="transc1" name="sin"/> <OMI>1</OMI> </OMA>

**** Question 2 ****

We need still to be able to name the attributes somehow.  Above we have
done this with the name= part.

There is the question as to whether it is best to 

(i)  use the name= field as a convenient place to hold the character string
     (i.e. allow any string as a name from the xml "pseudo CD"), or

(ii) to require that the name= truly be a symbol exported from a true XML cd,
     and put the string (e.g. "MathML-Presentation") elsewhere. (If so, where?)

What do people think about these two questions?   (We lean toward 2i.)

-- Stephen and Clare
om at openmath.org  -  general discussion on OpenMath
Post public announcements to om-announce at openmath.org
Automatic list maintenance software at majordomo at openmath.org
Mail om-owner at openmath.org for assistance with any problems

More information about the Om mailing list