Re: MathML Content and Operators

Replying to my own post..


I wrote

  Such an extension mechanism would have been possible but wasn't the one
  chosen for MathML. It would have been more difficult for users to extend
  in this way and still have documents valid to a dtd or schema as the dtd
  would have to be extended each time a new mathematical function was
  added.

In fairness I should add that despite the above comment, it is often
more convenient to use an empty element.

http://www.w3.org/TR/MathML/chapter5.html

discusses both aproaches, adding a new rank construct both using ci and
using a new empty element <mx:rank/>

At NAG for example we document our library internally using an in-house
dtd that uses a variant of MathML for mathematics markup. Its content
mathematics part uses the structure of Content MathML but the set of
empty elemsnts we use is completely different (as it's targetting a
rather different area of mathematics).

So for example

The first section of the document that appears

http://www.nag.co.uk/numeric/CL/manual/xhtml/s/s19abc.xml

is marked up in our internal sources as


<purpose-sec xid="purpose">
<p><thisroutine/> returns a value for the Kelvin function <maths>
 <apply>
  <bei/>
  <mi>x</mi>
 </apply>
</maths>.</p>
</purpose-sec>


But this markup (including the extended MathML markup with <bei/>
element) is only for in-house use.

It is distributed as XHTML+(Presentation) MathML

<h2><a name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>

<div class="paramtext">nag_kelvin_bei (s19abc) returns a value for the
 Kelvin function <math xmlns="http://www.w3.org/1998/Math/MathML"> 
 <mrow><mi>bei</mi><mo>&#8289;</mo><mi>x</mi></mrow>
</math>.</div>


A fragment of our in house dtd..

<!ELEMENT apply ((%function;),(%nagpmathml;)+)>
...



<!-- FUNCTIONS FOR USE AS FIRST CHILD OF APPLY -->
<!ENTITY % function 
 "abs|Ai|arc|arccos|arccosh|arcsin|arcsinh|arctan|arctanh|arg|
  bdi|bei|ber|Bi|
  cd|ci|Ci|cn|cond|cos|cosh|cot|coth|cov|covar|crit|cs|
  dc|det|dev|diag|dn|ds|
  erf|erfc|exp|
  Im|int|inv|
  kei|ker|
  lim|ln|log|logit|
  max|maximize|Maximize|mean|med|min|minimize|Minimize|mod|
  nc|nd|nint|ns|
  O|
  op|
  Prob|
  rank|Re|
  sc|sd|se|sech|Si|sign|sin|sinh|sn|span|sup|
  tan|tanh|trace|
  var|Var" >


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Received on Wednesday, 15 June 2005 10:22:34 UTC