Re: HTML5 with MathML has problem with numerical attrubute values

"Michael(tm) Smith" <mike@w3.org>, 2010-05-21 11:03 +0900:

> > @2010-05-20 10:20 -0700:
> > Following are a few examples of lines incorrectly marked as "Bad Value":
> >  
> > Line 560, Column 52: Bad value 0.8em for attribute width on element mspace.
> > 
> >     <mspace width="0.8em" />
> 
> That's caused by the MathML 2.0 RelaxNG schema which the validator.nu
> backend uses (from http://yupotan.sppd.ne.jp/relax-ng/mml2.html),
> which defines the allowed numeric value for the width attribute
> using a datatype that is constrained to match the following
> regular expression:
> 
>   [0-9]+(em|ex|px|in|cm|mm|pt|pc|%)
> 
> The number "0.8" doesn't match that regular expression, because of
> the "." dot character.
> 
> > Line 862, Column 58: Bad value 4.0 for attribute maxsize on element mo.
> > 
> > …   <mo maxsize="4.0" minsize="4.0">&#x007C;<!-- &vert; --></mo>
> 
> Same issue there: The schema defines the value of the maxsize
> attribute using exactly the same datatype that it uses to define
> the value of the width attribute.

OK, after taking a look at the relevant parts of the spec -

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

...I can see that it defines the allowed values for these cases as
"number" and that it defines "number" as:

  decimal integer or rational number (a string of digits with one
  decimal point), optionally starting with '-'

So we need to fix the copy of the MathML 2.0 RelaxNG schema that
we're using. For that I've filed another bug:

  http://bugzilla.validator.nu/show_bug.cgi?id=745

I notice that the MathML3 spec actually has an appendix with a
RelaxNG schema, and in there I find this regular expression:

  http://www.w3.org/TR/MathML3/appendixa.html#parsing_length
  pattern =
  '\s*((-?[0-9]*(\.[0-9]*)?(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*' 

So, I think we can just "backport" that to existing schema we're using.

> > Line 1339, Column 37: Bad value 3 for attribute rowspan on element mtd.
> > 
> >     <mtd rowspan="3">
> 
> The schema doesn't allow numeric values for the rowspan attribute;
> it constrains it to the following enumerated list of values:
> 
>   top, bottom, center, baseline, axis

After looking at the MathML 2.0 spec, I can see that this too is a
bug. For that I've filed another bug:

  http://bugzilla.validator.nu/show_bug.cgi?id=746

All that said, the upstream MathML 2.0 schema we are using is
really old now and does not appear to have had any maintenance or
bug fixes done on it for quite a long time. So given that the
MathML3 spec itself includes a RelaxNG schema, it may be that
we'll just end up replacing the existing copy we're using with
that (actively maintained) schema instead.

  --Mike

> > --- On Thu, 5/20/10, Michael(tm) Smith <mike@w3.org> wrote:
> > 
> > > From: Michael(tm) Smith <mike@w3.org>
> > > Subject: Re: HTML5 with MathML has problem with numerical attrubute values
> > > To: "Joe Java" <cop3252@yahoo.com>
> > > Cc: www-validator@w3.org
> > > Date: Thursday, May 20, 2010, 12:31 PM
> > > Joe Java <cop3252@yahoo.com>,
> > > 2010-05-20 08:50 -0700:
> > > 
> > > 
> > > It's a bug in the schema that's used by the validator.nu
> > > backend
> > > on which the HTML5 facet of the W3C Markup Validator
> > > relies.
> > > 
> > > I've filed a bug report for it:
> > > 
> > >   http://bugzilla.validator.nu/show_bug.cgi?id=744
> > > 
> > > ...and I will try to get the fix for that checked in very
> > > soon,
> > > and pushed out to the W3C Markup Validator shortly after
> > > that.
> > > 
> > >   --Mike
> > 
> > 
> > 
> > 
> > 
> > 
> 
> -- 
> Michael(tm) Smith
> http://people.w3.org/mike
> 
> 

-- 
Michael(tm) Smith
http://people.w3.org/mike

Received on Friday, 21 May 2010 05:31:22 UTC