[om] XML Namespace for OpenMath

David Carlisle davidc at nag.co.uk
Tue Jan 25 12:23:50 CET 2000


The current OM standard draft currently makes no mention of
a namespace to be used for XML encoded OpenMath in Namespace aware
applications.

I think that it is important that OpenMath does have a namespace and I
suggest 

http://www.openmath.org/OpenMath

as the URI. Note that it is not required that anything be at that URL,
it is just required that the nominal owner (ie the OpenMath Society in
this case) agree that that is to be the namespace.


Since the W3C XML Namespace Recommendation came out most XML based
languages declare an XML Namespace. This is a URI which is used as a
unique identifier for the elements in the language. So for example 
a `p' element in the namespace http://www.w3.org/1999/Markup/xhtml
is canonically the HTML paragraph element (even if it is used in an
otherwise non-html document) rather than some random element that
happens to be called p.

XML tools such as Xpath and XSLT (and proposed CSS3 extensions)
take a `namespace view' of XML which means that they _always_
treat element names as essentially a structured pair of the
namespace URI and the local element name. Thus a version of
OpenMath in a different namespace (or no namespace at all)
is to a namespace aware parser a completely different language in which
_every_ element has a different name.

Thus it is important that the namespace for OpenMath is fixed sooner
rather than later. Changing the namespace URI later would break _every_
stylesheet or XML query into an OpenMath document.

This has become relatively urgent as

a) We want to publicise a web page that offers to convert your OpenMath
  to MathML and render in mozilla, but it currently uses the above
  namespace for OpenMath more or less unofficially. If you do _not_
  use this Namespace, the input will not be recognised as OpenMath,
  and no conversion takes place/

b) the MathML 2 working draft has some examples of using OpenMath
  to extend MathML.
  as written the OpenMath elements fall into the MathML namespace
  which conceptually is worse than not being namespaced at all,
  so I want to modify the example to explicitly move the OpenMath
  elements out of MathML. The best way would be to add
  xmlns="http://www.openmath.org/OpenMath"
  to the OMOBJ element.....


The OM standard draft just says this at present:



\NOTE{1999/09/21}{DPC}{New section on embedding OM in XML documents}     
The above encoding of \XML\ encoded \OM\ specifies the grammar to be
used in files that encode a single \OM\ object, and specifies the
character streams that a conforming \OM\ application should be able
to accept or produce.

When embedding \XML\ encoded openmath objects into a larger XML document
one may wish, or need, to use other XML features. For example use of
extra \XML\ attributes to specify \XML\ Namespaces~\cite{xmlns}
or xml:lang attributes to specify the language used in strings~\cite{xml}.
Also, the encoding used in the larger document may not be \textsc{utf-8}.

If such \XML\ features are used then the \XML\ application controlling the
document must, if passing the OpenMath fragment to an \OM\ application,
remove any such extra attributes and must ensure that the
fragment is encoded according to the grammar specified above.


If the OM Society would confirm the use of
http://www.openmath.org/OpenMath
I would strengthen the above section to say that if XML encoded OpenMath
is used with namespace aware applications it should use this namespace.
practically speaking the only difference this makes is that the OMOBJ
element would typically have an additional
xmlns="http://www.openmath.org/OpenMath"
and the DTD could be modified to make that the default so if the DTD
were being used there would be no need to change the existing markup at
all.

David


--
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