Bugzilla – Bug 745
[MathML] fix mml.namedspace.datatype to allow rational numbers (not just integers)
Last modified: 2010-05-21 09:02:43 CEST
The mml.namedspace.datatype pattern definition in the MathML RNC schema currently uses the following regular expression: [0-9]+(em|ex|px|in|cm|mm|pt|pc|%)? The limits it to integer values. But the spec actually permits it to be a "decimal integer or rational number (a string of digits with one decimal point), optionally starting with '-'" So, we need to change the regular expression to match the spec.
I found the following regexp in the MathML3 spec: 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'll just review that a "backport" it with whatever changes (if any) are needed to make it conform to the MathML 2.0 spec.
Created attachment 160 [details] patch
validator r353