[Bug 9887] parsing algorithm should allow HTML content in MathML <annotation-xml>


--- Comment #17 from David Carlisle <davidc@nag.co.uk>  2010-08-19 20:59:47 ---
(In reply to comment #16)
> Well I can't speak for MathML, but I do consider it my responsibility to
> consider how HTML is going to be used, that's the only way I can make informed
> decisions on how to write the spec!

well yes, but some things are expressly extension points that when specifying
the language you want to ensure can carry information or be used for future as
yet un-thought of uses, but by default be ignored. data- attributes in html5
being a good example. annotation-xml is essentially exactly the same as data-
attributes except that math(ml) terms being structurally more complicated
typically require structured annotations hence the need for an element based
attribution mechanism rather than simply using xml/html attributes. So in an
ideal world (which may not be the world we live in) the default behaviour of
the html parser would, at minimum, always parse correctly to the end of the
annotation without messing up the rest of the expression, even if the
annotation was put in the wrong namespace or even discarded it would be better
than the behaviour shown in the attached example where annotating a subterm
kills the entire expression.
> Would it be acceptable to have <annotation-xml encoding="text/html"> be the way
> to escape back out to HTML?

Actually we had a Math WG telecon this afternoon and discussed this as one of
the possibilities. We weren't sure whether making the parsing of the content
depend on an attribute value would fit into the the html parser's world view. I
assume from your comment that this would be possible. This would certainly be a
lot better than the current behaviour.  Personally as I mention above I'd have
hoped it were possible to ensure that the annotation could always be parsed to
correctly find the end (assuming the content is well formed) however if that is
too difficult (either for you to do, or for us to persuade you to do it) I
suspect that using an attribute to switch the behaviour may in fact be
acceptable, but at this point you'd better not take my word for it: I'll take
this to the WG and report back.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 19 August 2010 20:59:49 UTC