Re: Samples from the Internet

David Carlisle said:
>
> <m:apply> <m:mo>&gg;</m:mo>
> is not valid, as can easiy be confirmed with a validating xml parser.

Thanks Carlisle, i also thought was not valid, but i prefer validation
against the spec. About 'easiy'...

2.1.2 MathML Validation [*] says:

  To test MathML-output-compliant processors, there is also MathML
  validation accessible over the Web as an option under the W3C Validation
  Service. Developers of MathML-output-compliant processors are encouraged
  to verify their output using this validator.

Unfortunately, the MathML code

<?xml version='1.0' encoding='utf-8' ?>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<apply>
 <mo>&gg;</mo>  <!-- put entity for the operator here -->
 <ci>x</ci>
 <cn>0</cn>
</apply>
</math>

tentatively passes the W3C Validation Service [**] selecting the MathML
2.0 doctype on the advanced options. The validation service only warns
about the losed doctype. Of course,

<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN"
"http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
<?xml version='1.0' encoding='utf-8' ?>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<apply>
<mo>&gg;</mo> <!-- put entity for the operator here -->
<ci>x</ci>
<cn>0</cn>
</apply>
</math>

when selecting the Doctype option "detect automatically" generates a "This
Page Is Valid MathML 2.0!" when is not.

Please change validator behavior. Or add above example to the list of
prohibited mixes of markup on next spec. for better training.

> On the question of whether to use csymbol or ci they are both allowed in
> exactly the same paces. ci is intended to encode a fairly generic
> identifier, at one extreme, general variable expressions such as f(x)
> wich you would use ci to encode both f and x.

I see no confusion here f(x) is

<apply>
 <ci type='fn'>f</ci>
 <ci>x</ci>
</apply>

because one can use the _predefined_ type value.

> csymbol can be used to
> indicate that the identifier denotes a symbol with a particuar fixed
> meaning specified externally, however the mathematial distinction
> between what is a fixed meaning and what is variable, is rather vague,
> depending on context that often s not explicit.
>
> David

However there exists none type='Equilibrium' on MathML spec. Therefore i
think that section 4.2.2.1 i cited, that csymbols are used to construct a
symbol whose semantics are not part of the core but defined outside of the
MathML specification, apply. I think would be <csymbol> instead <ci>.

I you claim that both can be used then maybe the spec would be rewritten
in sections 4.2.2.1, 4.4.2.3.1, and others. Explicity saying that
functions not defined in the spec can be encoded both as <csymbol> or <ci>
(or <declare> in some cases).

For instance the next spec fragment:

    To extend the collection of known mathematical functions
    without using the fn element, use the more generally applicable csymbol
    element or use a declare in conjunction with a lambda expression.

would read

    To extend the collection of known mathematical functions
    without using the fn element, use the more generally applicable csymbol
    element or use a declare in conjunction with a lambda expression or use
    a ci element.

In that way the new function 'Equilibrium'

<mml:ci definitionURL="" encoding="">Equilibrium</mml:ci>

would got sense.


[*]  http://www.w3.org/Math/iandi/compliance

[**] http://validator.w3.org/fragment-upload.html

Received on Saturday, 25 November 2006 11:02:53 UTC