Skip to content

MathML code validation can be invalid #1398

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions