NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 745 - [MathML] fix mml.namedspace.datatype to allow rational numbers (not just integers)
[MathML] fix mml.namedspace.datatype to allow rational numbers (not just inte...
Classification: Unclassified
Component: MathML 2.0 schema
All All
: P2 normal
Assigned To: Michael[tm] Smith
Depends on:
  Show dependency treegraph
Reported: 2010-05-21 06:26 CEST by Michael[tm] Smith
Modified: 2010-05-21 09:02 CEST (History)
0 users

See Also:

patch (955 bytes, patch)
2010-05-21 09:02 CEST, Michael[tm] Smith

Note You need to log in before you can comment on or make changes to this bug.
Description Michael[tm] Smith 2010-05-21 06:26:06 CEST
The mml.namedspace.datatype pattern definition in the MathML RNC schema currently uses the following regular expression:


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.
Comment 1 Michael[tm] Smith 2010-05-21 08:25:46 CEST
I found the following regexp in the MathML3 spec:
   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.
Comment 2 Michael[tm] Smith 2010-05-21 09:02:17 CEST
Created attachment 160 [details]
Comment 3 Michael[tm] Smith 2010-05-21 09:02:43 CEST
validator r353