This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17482 - MathML 3.0: linebreaking and indentation attributes in mspace
Summary: MathML 3.0: linebreaking and indentation attributes in mspace
Status: RESOLVED FIXED
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Macintosh MacOS X
: P2 major
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-13 15:18 UTC by Eduardo Tabacman
Modified: 2012-11-01 14:20 UTC (History)
2 users (show)

See Also:


Attachments

Description Eduardo Tabacman 2012-06-13 15:18:35 UTC
I tried validating the page http://www.afwings.net/mathml.htm
The MathML markup there is 

<math display='block'>
   <mrow>
      <mfrac>
         <mrow>
            <mn>1</mn>
         </mrow>
         <mrow>
            <mn>2</mn><mi linebreak="badbreak">x</mi>
         </mrow>
      </mfrac>
      <mspace linebreakstyle='before' indentalign='left' linebreak='newline'/>
      <mfrac>
         <mrow>
            <mn>1</mn>
         </mrow>
         <mrow>
            <mn>2</mn>
         </mrow>
      </mfrac>
   </mrow>
</math>

The validator reported 3 errors; the first one is a real one (linebreak in an mi), but the other two are:

Error: Attribute linebreakstyle not allowed on element mspace at this point.
From line 21, column 7; to line 21, column 78
ac>↩      <mspace linebreakstyle='before' indentalign='left' linebreak='newline'/>↩     
Error: Attribute indentalign not allowed on element mspace at this point.
From line 21, column 7; to line 21, column 78
ac>↩      <mspace linebreakstyle='before' indentalign='left' linebreak='newline'/>↩     

According to the MathML 3.0 spec, both linebreak and indentalign attributes are valid in mspace.
Comment 1 Michael[tm] Smith 2012-10-26 11:20:09 UTC
(Cc'ing David Carlisle)

David, error in the Relax NG MathML schema? Or did I maybe mess up something in the integration of it into the HTML5 schema?
Comment 2 David Carlisle 2012-10-26 12:04:04 UTC
(In reply to comment #1)
> (Cc'ing David Carlisle)
> 
> David, error in the Relax NG MathML schema? Or did I maybe mess up something
> in the integration of it into the HTML5 schema?

Sorry I messed up. The schema is extracted automatically from the attribute syntax tables in the specification. But mspace, in addition to its own table of attributes, has the remark

mspace also accepts the indentation attributes described in Section 3.2.5.2.3 Indentation attributes. 


The extraction code can cope with such special cases but only when I notice them and add a clause to the extractor.


Note however that covers indentalign which should be valid but not (as written) linebreakstyle which is not in the referenced  3.2.5.2.3  but the earlier 3.2.5.2.2 Linebreaking attributes. I believe that is intentional but will flag this with the working group before changing the schema.  Since mspace here is an invisible marker just recording the line break, allowing linebreakstyle=before wouldn't really add anything as it would presumably act the same as linebreakstyle=after.


Sorry I will get an update to you as soon as possible.  It also means I think that thee are some coverage gaps to be filled in the mathml test suite which I should fix at same time as I am sure I validated all the tests that were intended to be valid, which should have picked up attributes missing from the schema.
Comment 3 Michael[tm] Smith 2012-10-26 12:11:45 UTC
(In reply to comment #2)
OK so as far as the validator I'll the push a change out after I get it from you. (Right now I'm working on trying to make the HTML parser less strict about "ambiguous ampersands" since the spec relaxed the requirements on that a while back...)
Comment 4 David Carlisle 2012-10-28 23:36:30 UTC
(In reply to comment #3)

This has been fixed in the schema in the Math CVS/website area as noted in

http://lists.w3.org/Archives/Public/www-math/2012Oct/0020.html

In addition to the change in indentation attributes the schema has one other change since the version incorporated into validator.nu originally relating to an edge case involving the regexp for negative values in attribute syntax. I didn't bother asking for that to be pushed to validator.nu at th etime, but it would make sense to incorporate that now as well to get the schema back in sync. See

http://lists.w3.org/Archives/Public/www-math/2012Jul/0000.html
Comment 5 Michael[tm] Smith 2012-10-29 11:07:18 UTC
(In reply to comment #4)
Thanks David. I'll take a look at this this week but may not be able to land the change and get it deployed to the validator until next week.
Comment 6 Michael[tm] Smith 2012-11-01 14:20:59 UTC
Fixed in the validator sources and pushed to http://validator.w3.org/nu/

https://bitbucket.org/validator/validator/changeset/0230ac5d3065038ba5522746f3265cfd650fc3d0