Re: Please provide use cases/examples for HTML content in <annotation-xml>

Michael,

Allow me to chat a bit before I post to the bug since I might be  
representing my own opinion and not the group's.

Annotation-xml allows a content-provider to indicate alternate  
representations and other annotations to a MathML sub-tree.

The MathML text does only specify one recommendation wrt annotation- 
xml when it's an alternate representation: the chapter 6 indicates  
that when that term is selected and a copy action is requested, the  
annotation-xml XML-tree should be exported as one of the flavours of  
the clipboard provided it is safe.

What this request is, is whether HTML5 content should be put as  
annotation-xml.

My first answer is no: HTML5 is not XML. XHTML5 could be considered  
but I think HTML5 should not.
If you need to provide, for clipboard, an HTML5 alternative, you can  
always use
  <annotation-xml href="the-html5-bit.html"/>
which will certainly will, if parsed by some recipients as HTML5 if  
flagged as  such (the browser first, for the sanitization, then the  
recipient application for pasting).

My second answer would be: why not?
Honestly, I'm sure someone would find it a good idea to apply,  
especially since HTML5's style is so nicely compact.

But I'm sure everyone is happy if there's a parsing explanation that  
this is not possible since only XML content is possible as soon as you  
cross the MathML or SVG border. Can you/we/the-html-group provide that  
explanation?

paul



Le 29-juin-10 à 09:13, Michael(tm) Smith a écrit :

> If you have use cases and/or real-world examples, in existing
> documents, of <annotation-xml> instances containing HTML content,
> please post them as replies to this message and/or as comments
> to the following HTML WG bugzilla bug -
>
>  http://www.w3.org/Bugs/Public/show_bug.cgi?id=9887
>
> The background on my request is this:
>
> - The HTML5 specification defines an algorithm for parsing
>   text/html (non-XML) documents that contain MathML elements.
>
> - That algorithm deals with the <annotation-xml> element as a
>   special case; it provides for both SVG and MathML content in
>   <annotation-xml> being properly parsed into a DOM as expected.
>
> - However, for the case of HTML content in <annotation-xml>, it
>   does not provide for that content getting into the DOM as child
>   content of the <annotation-xml> element; instead such content
>   will essentially end up getting into the DOM as a following
>   sibling of any ancestor <math> element.
>
> You can test and see for yourself by using a recent Mozilla
> Minefield or Firefox nightly build with this page:
>
>  http://software.hixie.ch/utilities/js/live-dom-viewer/
>
> for example:
>
>  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Ctitle%3E%3C%2Ftitle%3E%0A%3Cp%3E%0A%3Cmath%3E%0A%3Csemantics%3E%0A%3Cmi%3Efoo%3C%2Fmi%3E%0A%3Cannotation-xml%3E%0A%3Cimg%20src%3Dbar%3E%0A%3C%2Fannotation-xml%3E%0A%3C%2Fmath%3E%0A%3C%2Fp%3E
>
>  or: http://bit.ly/dy4Rxj
>
> So what I would like to try to get clarification on is whether
> there are compelling use cases for having HTML content within the
> <annotation-xml> element that would justify making a change at
> this point to the parsing algorithm in the HTML5 spec (and to the
> behavior of existing implementations of that).
>
>  --Mike
>
> -- 
> Michael(tm) Smith
> http://people.w3.org/mike
>

Received on Tuesday, 29 June 2010 08:34:36 UTC