Last Comment Bug 276028 - MathML-Contentmarkup not supported.
: MathML-Contentmarkup not supported.
Status: NEW
:
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: -- enhancement with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Anthony Jones (:kentuckyfriedtakahe, :k17e)
Mentors:
Depends on: 714483 276267
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-26 04:49 PST by Daniel Kraft
Modified: 2012-11-05 02:59 PST (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (112 bytes, application/xml)
2004-12-27 00:53 PST, Anne (:annevk)
no flags Details
MathML ctop addon (9.16 KB, application/x-xpinstall)
2012-11-05 02:43 PST, Frédéric Wang (:fredw)
no flags Details

Description Daniel Kraft 2004-12-26 04:49:32 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20041219
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20041219

Mozilla fails to render MathML-Content Markup, it should be implemented.

Reproducible: Always

Steps to Reproduce:
Open this simple test-file:

<?xml version="1.0" ?>
<math xmlns="http://www.w3.org/1998/Math/MathML">
 <apply>
  <plus/>
  <cn>1</cn>
  <cn>2</cn>
 </apply>
</math>

Actual Results:  
Just "1 2" is displayed, as if all tags were ignored.

Expected Results:  
Something like "1+2" should be displayed, as the testfile says "the sum of the
two numbers 1 and 2".
Comment 1 Daniel Kraft 2004-12-26 05:02:10 PST
Although the Parallel Markup-example in the W3C-Recommendation (2.0) is
displayed correctly in Mozilla, I don't know how (if) Parallel Markup is
recognized and parsed by Mozilla.
I think we should represent all MathML (except Presentation Markup only, which
is currently supported) as Parallel Markup, explicitly as such specified in the
document, or implicitly, with auto-generated Presentation Markup (for Content only).
It shouldn't be a big problem to implement (at least basic) Content
Markup-support by generating default Presentation Markup, which is rendered
then, if Parallel Markup is supported. (If we implement the Content
Markup-DOM-Interfaces first, it could even be done in JavaScript; but
personally, I like C++ more)
Comment 2 Anne (:annevk) 2004-12-27 00:53:28 PST
Created attachment 169625 [details]
testcase
Comment 3 Daniel Kraft 2004-12-28 12:33:17 PST
First of all, we should ensure that there are specific classes for
MathML-elements, to allow, for instance, to implement methods to connect
corresponding Presentation & Content Markup.
Comment 4 Daniel Kraft 2004-12-28 12:45:34 PST
The auto-generation of the Presentation part in the Parallel Markup could also
be done by the mathmlc2p-stylesheets. Couldn't it? Implementing Content Markup
should therefore be not a very big problem when once MathML-DOM is present.
Comment 5 Alex Vincent [:WeirdAl] 2005-01-02 09:26:41 PST
The premise of this bug, that Mozilla should render content markup, is incorrect.

Content markup is not supposed to be rendered under any circumstances.  With
either parallel or mixed MathML markup, we see the presentation MathML and not
the  content MathML.

The danger, really, is that content markup represents the exact value of a
MathML expression, while presentation markup represents how the MathML
expression is rendered.  That's the entire purpose of presentation MathML. 
Content MathML is for computers.  Presentation MathML is for humans.

I think it is a bad idea to define a default presentation for any content
MathML, and recommend WONTFIX for this enhancement.
Comment 6 Daniel Kraft 2005-01-02 09:57:47 PST
I think MathML parsers should also be able to render Content Markup only. Of
course, it is there to allow, for example, that a Computer Algebra System is
attached to Mozilla, and that Mozilla can solve equations via Context Menu.
But what would it use to have a XHTML-document with inline Content MathML, if
one the one hand the human couldn't see the Math, and on the other hand, the
computer couldn't understand the text written in XHTML? I see Content Markup as
some sort of more correct MathML: You don't specify how something is to be
rendered, but what it means (as if you wrote a poem in XHTML with <l> elements
instead of <br>), but written for computers AND humans, too. See section 5.4 of
MathML 2.0 Recommendation.
Of course, the Content Markup should be kept, but I think we should provide
default Presentation Markup for Content Markup only.
Comment 7 Frédéric Wang (:fredw) 2011-08-13 04:01:54 PDT
FYI, here is the repository of David Carlisle's converter, from presentation MathML to content MathML:

http://code.google.com/p/web-xslt/source/browse/trunk/#trunk/ctop
Comment 8 Frédéric Wang (:fredw) 2012-01-05 14:03:42 PST
Would it be a good idea / possible to implement conversion from content to presentation MathML using XBL?
Comment 9 Frédéric Wang (:fredw) 2012-11-05 02:43:51 PST
Created attachment 678255 [details]
MathML ctop addon

FYI, I've written a restartless add-on to render content MathML, based on David Carlisle's ctop stylesheet. I plan to submit it to AMO.
Comment 10 David Carlisle 2012-11-05 02:53:35 PST
(In reply to Frédéric Wang (:fredw) from comment #8)
> Would it be a good idea / possible to implement conversion from content to
> presentation MathML using XBL?

I looked at that a _long_ time ago, I think it would be possible to do something if it would be useful but as an outsider I got lost in the various flavours of (s)xbl(1/2) I assume things are now more stable and it's clear to a mozilla insider what facilities are available?
Comment 11 Frédéric Wang (:fredw) 2012-11-05 02:59:05 PST
> (In reply to Frédéric Wang (:fredw) from comment #8)
> > Would it be a good idea / possible to implement conversion from content to
> > presentation MathML using XBL?
> 
> I looked at that a _long_ time ago, I think it would be possible to do
> something if it would be useful but as an outsider I got lost in the various
> flavours of (s)xbl(1/2) I assume things are now more stable and it's clear
> to a mozilla insider what facilities are available?

I'm not really sure about that. The last update I saw was

http://enndeakin.wordpress.com/2012/03/30/xbl-forward/

but I have not seen any progress on bug 374737.

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