Skip to content

MathML code validation can be invalid #1398

@agarny

Description

@agarny

Description

We are currently validating MathML code using the MathML DTD. This does, however, allow some invalid MathML code. For instance:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <apply>
    <eq />
    <ci>y</ci>
    <apply>
      <sin />
      <ci>a</ci>
      <ci>b</ci>
      <ci>c</ci>
    </apply>
  </apply>
</math>

is allowed even though the sin element requires one child, i.e.

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <apply>
    <eq />
    <ci>y</ci>
    <apply>
      <sin />
      <ci>a</ci>
    </apply>
  </apply>
</math>

Similarly, the following is currently allowed:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <apply>
    <eq />
    <ci>y</ci>
    <apply>
      <rem />
      <ci>a</ci>
    </apply>
  </apply>
</math>

even though the rem element requires two children, i.e.

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <apply>
    <eq />
    <ci>y</ci>
    <apply>
      <rem />
      <ci>a</ci>
      <ci>b</ci>
    </apply>
  </apply>
</math>

Scope

MathML code validation.

Acceptance criteria

Correct MathML code validation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions