Last Comment Bug 403311 - /mozilla/layout/mathml/tests/ : xml pages are not W3C-valid
: /mozilla/layout/mathml/tests/ : xml pages are not W3C-valid
Product: Core
Classification: Components
Component: MathML (show other bugs)
: unspecified
: All All
-- trivial (vote)
: mozilla1.9.3a1
Assigned To: Frédéric Wang (:fredw)
: Anthony Jones (:kentuckyfriedtakahe, :k17e)
Depends on:
  Show dependency treegraph
Reported: 2007-11-10 03:06 PST by Frédéric Wang (:fredw)
Modified: 2009-09-15 20:33 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Fixes some errors. (8.38 KB, patch)
2007-11-10 03:10 PST, Frédéric Wang (:fredw)
no flags Details | Diff | Splinter Review
Replace <br/> by <mspace linebreak="newline"/> (12.03 KB, patch)
2009-09-02 03:25 PDT, Frédéric Wang (:fredw)
karlt: review+
Details | Diff | Splinter Review

Description User image Frédéric Wang (:fredw) 2007-11-10 03:06:29 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv: Gecko/20071022 Ubuntu/7.10 (gutsy) Firefox/
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv: Gecko/20071022 Ubuntu/7.10 (gutsy) Firefox/

When you check the XML pages using the W3C validator, you get some errors. Some of them can be easily fixed. However, two types of them are due to W3C limitations :

- maxwell.xml : the declared "vec" entity is not parsed. This seems to be a bug of the W3C validator.

- mixing.xml : the XHTML elements are not accepted inside a MathML test. The doctype used is only for XHTML as the host language.

Reproducible: Always

Steps to Reproduce:
Comment 1 User image Frédéric Wang (:fredw) 2007-11-10 03:10:04 PST
Created attachment 288128 [details] [diff] [review]
Fixes some errors.
Comment 2 User image Frédéric Wang (:fredw) 2008-10-28 03:20:50 PDT
Comment on attachment 288128 [details] [diff] [review]
Fixes some errors.

This is an old bug but my patch seems still appliable.
Comment 3 User image Karl Tomlinson (:karlt) 2008-11-09 14:29:45 PST
Comment on attachment 288128 [details] [diff] [review]
Fixes some errors.

--- layout/mathml/tests/mixing.xml	25 Aug 2004 23:02:47 -0000	1.7
+++ layout/mathml/tests/mixing.xml	10 Nov 2007 10:03:39 -0000

 <body style="font-size: 18pt; 
       background-color: gold;
       background-image: url(resource:/res/samples/raptor.jpg);
       background-repeat: no-repeat;
       background-attachment: fixed;">
 <h2 style="text-align: center; color: blue">
 Mixing MathML markups and other markups to get special effects</h2>

I would put the div after the h2.

-    <html:img src="chrome://communicator/skin/brand/throbber-anim.gif" />
+    <html:img src="chrome://communicator/skin/brand/throbber-anim.gif" alt="" />

I would use alt="throbber".  Here the img is not just for formatting but
important for the demonstration, so shouldn't just become invisible.

--- layout/mathml/tests/various.xml	27 Mar 2005 11:36:01 -0000	1.8
+++ layout/mathml/tests/various.xml	10 Nov 2007 10:03:39 -0000

-<br />
 <!-- {3 \atop k} R {1 \atop i} {2 \atop j} -->

-<br />

-<br /> 

The <br /> here imply that the author wants a line break, and that would
certainly make this easier to read.  No newline is being generated, but I'd
rather not remove the <br /> until this is rewritten with appropriate markup
that does provide the line break.
Comment 4 User image Frédéric Wang (:fredw) 2009-09-02 03:25:08 PDT
Created attachment 398104 [details] [diff] [review]
Replace <br/> by <mspace linebreak="newline"/>

It seems that the W3C does not define inclusion of XHTML inside MathML, so I think we can't make the file mixing.xml valid for the moment:

I replaced the <br/>'s inside MathML by <mspace/>'s. However, it looks like Mozilla does not support the attribute "linebreak" (anyway the <br/>'s currently do not make any likebreak). See bug 380266
Comment 5 User image Karl Tomlinson (:karlt) 2009-09-07 14:57:28 PDT
Comment on attachment 398104 [details] [diff] [review]
Replace <br/> by <mspace linebreak="newline"/>

I don't actually understand why entities declared in can't be used be used in other entity declarations, but these changes look good anyway, thanks.
Comment 6 User image Karl Tomlinson (:karlt) 2009-09-15 20:33:04 PDT

Note You need to log in before you can comment on or make changes to this bug.