<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>9859</bug_id>
          
          <creation_ts>2010-06-05 05:39:51 +0000</creation_ts>
          <short_desc>add document-conformance constraints for documents that contain SVG or MathML content that in turn contains HTML content</short_desc>
          <delta_ts>2010-10-04 14:48:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael[tm] Smith">mike</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>35983</commentid>
    <comment_count>0</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2010-06-05 05:39:51 +0000</bug_when>
    <thetext>I note that the &apos;The &quot;in foreign content&quot; insertion mode&apos; subsection of the &quot;Tree construction&quot; section defines as a parse error any instance of &apos;A start tag whose tag name is one of: &quot;b&quot;, &quot;big&quot;, &quot;blockquote&quot;, &quot;body&quot;, &quot;br&quot;, &quot;center&quot;,&apos;, etc., when the parser is in the &quot;in foreign content&quot; insertion mode.

http://dev.w3.org/html5/spec/tokenization.html#parsing-main-inforeign

That&apos;s all great, but the author view of the spec doesn&apos;t provide any corresponding requirements on documents/authors when they are creating documents that contain SVG and MathML content.

So I think it would be helpful if the spec could state something like, &apos;Documents [meaning serialized documents, not parsed DOM representations] must not have SVG or MathML content that contains any of the following elements: &quot;b&quot;, &quot;big&quot;, &quot;blockquote&quot;, &quot;body&quot;, &quot;br&quot;, &quot;center&quot;,&apos; etc.

I realize that a parsed document in memory is not going to contain such instances. I mean for this suggestion to apply to guidance for authors on how to produce conformant documents.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35984</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2010-06-05 05:50:23 +0000</bug_when>
    <thetext> I&apos;m looking at this test case: http://validator.nu/?doc=https%3A%2F%2Feyeasme.com%2FJoe%2FMathML%2FHTML5%2Fextras.html&amp;showsource=yes#l230c87

...which is originally from http://www.mozilla.org/projects/mathml/demo/extras.xhtml

validation on it fails -- actually, proper error-free parsing of it fails -- because it has an HTML img element within a MathML annotation-xml element, as far as I can tell

but HTML img within MathML annotation-xml seems to be valid as far as MathML is concerned, and as far as validator.nu is concerned, if it&apos;s served with an XML MIME type -

http://validator.nu/?doc=https%3A%2F%2Feyeasme.com%2FJoe%2FMathML%2FHTML5%2Fextras.xhtml&amp;showsource=yes

It seems the the only case where it&apos;s not conformant is when it&apos;s served as text/html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36009</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2010-06-07 03:40:26 +0000</bug_when>
    <thetext>&quot;A start tag whose tag name is &quot;svg&quot;, if the current node is an annotation-xml element in the MathML namespace.&quot;

The HTML5 parser only allows &lt;svg&gt; or MathML in &lt;annotation-xml&gt;. Not HTML. &lt;span&gt; will be in MathML namespace.

We could change the parser to allow HTML there (like it allows HTML in MathML &lt;mi&gt;), but then it would break MathML in &lt;annotation-xml&gt;. The MathML spec has an example with MathML in &lt;annotation-xml&gt;.

Maybe we need a special tag that enables HTML in &lt;annotation-xml&gt;? &lt;div&gt;? It means MathML can&apos;t have a future element called &lt;div&gt;.

&quot;A start tag whose tag name is &quot;svg&quot; or &quot;div&quot; if the current node is an annotation-xml element in the MathML namespace.&quot;

However... The XHTML version doesn&apos;t use &lt;annotation-xml&gt; at all. Why does the HTML version? Shouldn&apos;t it use &lt;mn&gt; or &lt;mtext&gt; instead?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36011</commentid>
    <comment_count>3</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2010-06-07 05:12:00 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; &quot;A start tag whose tag name is &quot;svg&quot;, if the current node is an annotation-xml
&gt; element in the MathML namespace.&quot;
&gt; 
&gt; The HTML5 parser only allows &lt;svg&gt; or MathML in &lt;annotation-xml&gt;. Not HTML.
&gt; &lt;span&gt; will be in MathML namespace.

I see now... I had not noticed that previously.
&gt; However... The XHTML version doesn&apos;t use &lt;annotation-xml&gt; at all. Why does the
&gt; HTML version? Shouldn&apos;t it use &lt;mn&gt; or &lt;mtext&gt; instead?

I also hadn&apos;t noticed that the original source did not use &lt;annotation-xml&gt;.. I&apos;ll ask the person who originally reported if why he made that change</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36012</commentid>
    <comment_count>4</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2010-06-07 06:55:06 +0000</bug_when>
    <thetext>Could be my fault for making an incorrect statement about annotation-xml on the Mozilla Hacks blog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36060</commentid>
    <comment_count>5</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2010-06-09 02:29:24 +0000</bug_when>
    <thetext>FYI, I opened a related bug, bug 9887, &quot;parsing algorithm should allow HTML content in MathML &lt;annotation-xml&gt;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36136</commentid>
    <comment_count>6</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2010-06-14 01:34:47 +0000</bug_when>
    <thetext>I had some offlist discussion about where HTML elements should be allowed in MathML content, and that leads me to suggest that it should be restricted to &lt;mtext&gt; elements. I realize that the parsing algorithm also processes HTML content correctly if it&apos;s in &lt;mi&gt;, &lt;mn&gt;, &lt;mo&gt;, and &lt;ms&gt; elements, but I think this is a case where it makes sense for the document-conformance requirements to be stricter than what the parsing algorithm allows</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36137</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2010-06-14 06:21:47 +0000</bug_when>
    <thetext>&gt; I think
&gt; this is a case where it makes sense for the document-conformance requirements
&gt; to be stricter than what the parsing algorithm allows

Why? Is this something that will change over time (i.e. do you think it will make sense to allow HTML in &lt;mn&gt; in the future)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36138</commentid>
    <comment_count>8</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2010-06-14 06:37:21 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; &gt; I think
&gt; &gt; this is a case where it makes sense for the document-conformance requirements
&gt; &gt; to be stricter than what the parsing algorithm allows
&gt; 
&gt; Why? Is this something that will change over time (i.e. do you think it will
&gt; make sense to allow HTML in &lt;mn&gt; in the future)?

I don&apos;t think it will make sense to allow HTML in &lt;mn&gt; in the future, no. But from what I&apos;ve gleaned both about MathML semantics and that MathML tools situation, putting HTML into &lt;mn&gt; (or any of the &quot;token elements&quot; except for &lt;mtext&gt;) is both not a good match for MathML semantics and also a potential problem for other non-browser MathML processing tools. I think the case is that the existing tools don&apos;t necessarily expect to do any processing at all of &lt;mtext&gt; contents -- and so any non-MathML-namespace markup they find in &lt;mtext&gt; is not going to cause them any processing failures -- whereas some tools do not expect such markup in &lt;mn&gt;, etc., so it may cause them some processing failures.

Anyway, I think what we&apos;ll eventually need is for someone knowledgeable about MathML semantic differences and the MathML tool situation -- preferably somebody from the Math WG -- to post comment here with some more details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38036</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-08-27 20:46:35 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: It&apos;s already the case that you can&apos;t legally put those elements the places where they cause problems, by virtue of them not being valid in SVG and MathML.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>