<?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>15180</bug_id>
          
          <creation_ts>2011-12-14 12:48:07 +0000</creation_ts>
          <short_desc>Default handling of  non-XHTML XML docs is under-/un- specified</short_desc>
          <delta_ts>2012-12-06 11:53:12 +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>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</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="Henry S. Thompson">ht</reporter>
          <assigned_to name="Robin Berjon">robin</assigned_to>
          <cc>eoconnor</cc>
    
    <cc>ian</cc>
    
    <cc>julian.reschke</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>silviapfeiffer1</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>61543</commentid>
    <comment_count>0</comment_count>
    <who name="Henry S. Thompson">ht</who>
    <bug_when>2011-12-14 12:48:07 +0000</bug_when>
    <thetext>Split off from https://www.w3.org/Bugs/Public/show_bug.cgi?id=14689 per Comment 3.  

When an XML document is processed, but _no_ stylesheet PI is present and the root element is not &apos;html&apos;, existing practice is to produce a default indented tree view of the XML itself.  It probably doesn&apos;t make sense to _require_ this, but it would be good if somewhere in section &quot;Page load processing model for XML files&quot; the &apos;other XML, no stylesheet&apos; case was explicitly called out, and such default behaviour allowed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61544</commentid>
    <comment_count>1</comment_count>
    <who name="Julian Reschke">julian.reschke</who>
    <bug_when>2011-12-14 13:38:48 +0000</bug_when>
    <thetext>This obviously should *allow* UAs to process a stylesheet link header field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61545</commentid>
    <comment_count>2</comment_count>
    <who name="Henry S. Thompson">ht</who>
    <bug_when>2011-12-14 15:09:07 +0000</bug_when>
    <thetext>Thanks Julian -- yes, I should have said, since CSSOM already covers the Link header case (along with basic xml-stylesheet stuff) &quot;When an XML document is processed, but no stylesheets are associated with it per &quot;6.3 Style Sheet Association&quot; in CSSOM (http://dev.w3.org/csswg/cssom/#style-sheet-association)  and the root element is not &apos;html&apos;, . . .&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63230</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-01-28 18:29:01 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6928.
Check-in comment: copypasta
http://html5.org/tools/web-apps-tracker?from=6927&amp;to=6928</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63231</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-01-28 18:29:59 +0000</bug_when>
    <thetext>Apologies, that was intended for bug 15177.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70422</commentid>
    <comment_count>5</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 07:28:01 +0000</bug_when>
    <thetext>This bug was cloned to create bug 17980 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73306</commentid>
    <comment_count>6</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-09-06 14:32:52 +0000</bug_when>
    <thetext>Actually, the rules for processing this appear to be more complex than just the lack of association with a style sheet.

For instance, if you serve (as XML) the following XML document:

    &lt;foo&gt;&lt;p&gt;foo&lt;/p&gt;&lt;/foo&gt;

You will consistently get the tree source rendering. If however you modify it to be:

    &lt;foo&gt;&lt;p xmlns=&apos;http://www.w3.org/1999/xhtml&apos;&gt;foo&lt;/p&gt;&lt;/foo&gt;

or even:

    &lt;foo&gt;&lt;zorglub xmlns=&apos;http://www.w3.org/1999/xhtml&apos;&gt;foo&lt;/zorglub&gt;&lt;/foo&gt;

Then the rendering reverts to HTML, irrespective of how far in the document the namespace declaration appears. This works using prefixes too. The namespace declaration on its own is not enough though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73322</commentid>
    <comment_count>7</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-09-06 15:56:04 +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: Accepted
Change Description: Opened up the possibility as requested, and also defined the specifics of the behaviour as noted in browsers.
Rationale: It&apos;s already implemented, might as well be described correctly.

https://github.com/w3c/html/commit/ab4b3dab8da4e150d18e7f514e2009d6f95381ca</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73326</commentid>
    <comment_count>8</comment_count>
    <who name="Henry S. Thompson">ht</who>
    <bug_when>2012-09-06 16:16:07 +0000</bug_when>
    <thetext>(In reply to comment #7)

That&apos;s great, thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73334</commentid>
    <comment_count>9</comment_count>
    <who name="Edward O&apos;Connor">eoconnor</who>
    <bug_when>2012-09-06 16:59:33 +0000</bug_when>
    <thetext>Robin, how is your proposed solution compatible with incremental parsing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73339</commentid>
    <comment_count>10</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-09-06 17:17:49 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; Robin, how is your proposed solution compatible with incremental parsing?

As far as I could work out, here&apos;s what happens. If the document is clearly XML, and the root element isn&apos;t &quot;html&quot;, then if it matches something for an external handler like Atom, it might be dispatched off to that. If however it doesn&apos;t match that the browser seems to just parse, parse, parse and render nothing. If at some point it suddenly sees an HTML/SVG/MathML element, it will render accordingly (applying the default UA style sheet and all). If it reaches the end without having seen one such element, then it shows the tree view. I tried this out by feeding browsers some megabytes-long document.

I&apos;m not sure how that could hurt incremental parsing, though I&apos;d be happy to learn. It certainly hurts incremental rendering (of XML documents that have no HTML content) but this doesn&apos;t not strike me as a huge problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73364</commentid>
    <comment_count>11</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-09-06 20:29:38 +0000</bug_when>
    <thetext>If that&apos;s what should happen, you should invoke the &quot;render the XML tree&quot; in the &quot;The end&quot; section. I&apos;m not sure how to require that nothing be rendered while waiting for a supported element (which could be in a namespace other than HTML/SVG/MathML) or &quot;the end&quot;, but that would have to be stated somehow. That the rendering section applies when there are supported elements is already the case. Saying that the rendering section &quot;must&quot; be followed means that the whole rendering section changes conformance class, since the rendering section has a special conformance class and avoids using &quot;must&quot;.

That said, did you test Opera wrt incremental rendering of the XML-tree view?

Does it make sense to disallow incremental rendering of the XML tree?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73366</commentid>
    <comment_count>12</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-09-06 20:35:59 +0000</bug_when>
    <thetext>Moreover, the spec now requires that the tree view be rendered even if there are style sheets present, which seems wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78996</commentid>
    <comment_count>13</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-11-28 15:37:16 +0000</bug_when>
    <thetext>Hixie submitted a patch for the related WHATWG bug 17980 :
https://github.com/w3c/html/commit/e6649c31465e451b76aff1ac59eb7e29f31d6c3e
Can you take care of merging it in?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79546</commentid>
    <comment_count>14</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-12-06 11:25:30 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; Hixie submitted a patch for the related WHATWG bug 17980 :
&gt; https://github.com/w3c/html/commit/e6649c31465e451b76aff1ac59eb7e29f31d6c3e
&gt; Can you take care of merging it in?

I&apos;ve merged it in.

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: Accepted
Change Description: Applied WHAT change (describes the processing)
Rationale: Useful addition</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79548</commentid>
    <comment_count>15</comment_count>
    <who name="Henry S. Thompson">ht</who>
    <bug_when>2012-12-06 11:53:12 +0000</bug_when>
    <thetext>Thanks</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>