RE: Validation of MathML

David Carlisle [mailto:davidc@nag.co.uk] wrote on 27 February 2003 21:01:
> Simon,
> 
> Others have mentioned the schema, but assuming that you want a dtd
> version to fit into a larger dtd based document type, have you noticed
> that the current version has an option to turn on stricter checking
> just set
>    <!ENTITY % MathMLstrict "INCLUDE">
> before including the mathml dtd into your dtd.
> 
> there is some documentation of this feature in appendix a of the draft
> version of mathml2 2nd edition.
> 
> I'd be interested to know if
> a) these extra dtd based tests would be useful to you

I had constructed a number of files with errors that were not caught by DTD
parsing. With this new version all errors were caught by the parser, except
for an error with the number of post- and prescripts in mmultiscripts. This
is very useful; I am going to use this DTD in our validation.

> and
> b) if you've spotted any other places where this parameter 
> entity could
> turn on some stricter checks. (there certainly are a few more places I
> suspect)

mmultiscripts requires an even number of post- and prescripts. I caught
errors against that rule with this patch:

6943,6945c6943,6946
<   <!ENTITY % prscrPresExpression " (
<   (%Presentation; | %ContInPres;|%none.qname;)*,
<   (%mprescripts.qname;,(%Presentation; | %ContInPres;|%none.qname;)*)?
---
>   <!ENTITY % prscrPresExpression " (%onePresExpression;,
>
((%onePresExpression;|%none.qname;),(%onePresExpression;|%none.qname;))*,
>   (%mprescripts.qname;,
>
((%onePresExpression;|%none.qname;),(%onePresExpression;|%none.qname;))*)?

The tar file on the MathML web site, http://www.w3.org/Math/DTD/mathml2.tgz,
includes the old versions of the DTDs, without the MathMLstrict feature. It
also contains multiple copies of a number of files.

Regards, Simon

Simon Pepping
DTD Development and Maintenance
Elsevier
s.pepping@elsevier.com
www.elsevier.com/locate/sgml

Received on Wednesday, 19 March 2003 10:10:52 UTC