<?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>25294</bug_id>
          
          <creation_ts>2014-04-08 21:03:28 +0000</creation_ts>
          <short_desc>DOMParser.parseFromString with application/whatever+xml</short_desc>
          <delta_ts>2014-10-04 16:45:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM Parsing and Serialization</component>
          <version>unspecified</version>
          <rep_platform>All</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="David Junger">tffy</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>annevk</cc>
    
    <cc>bugs</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>esprehn</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps-bugzilla</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103571</commentid>
    <comment_count>0</comment_count>
    <who name="David Junger">tffy</who>
    <bug_when>2014-04-08 21:03:28 +0000</bug_when>
    <thetext>The specification disallows any type for DOMParser.parseFromString that isn&apos;t enumerated. That means anything except SVG and XHTML has to pretend to be generic XML, even though SVG and XHTML don&apos;t actually get any special treatment from the algorithm, so why not let other XML types be honest about what they are and use their full MIME type?
Right now Webkit browsers actually behave that way (i.e. you can use &quot;application/whatever+xml&quot; as the second argument to parseFromString and they won&apos;t throw an error), while Firefox follows the spec to the letter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103575</commentid>
    <comment_count>1</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2014-04-08 21:10:55 +0000</bug_when>
    <thetext>So what is the use case you have?
If you just want a Document created from a string, why don&apos;t you pass
&quot;text/xml&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103576</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-04-08 21:17:21 +0000</bug_when>
    <thetext>Note that Blink also follows the spec here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103578</commentid>
    <comment_count>3</comment_count>
    <who name="David Junger">tffy</who>
    <bug_when>2014-04-08 21:25:07 +0000</bug_when>
    <thetext>I know I can just pass &quot;application/xml&quot; or &quot;text/xml&quot;. I just don&apos;t like that the DOMParser as specified uses an argument that *looks* like a MIME type but doesn&apos;t behave accordingly. It&apos;s misleading, especially with disagreeing implementations.
If you want a small enumeration, why not just use {&quot;html&quot;, &quot;xml&quot;} and nothing else, since that&apos;s what really matters for the algorithm at this point? but it&apos;s too late for that, so loosening the definition would be the next best thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103595</commentid>
    <comment_count>4</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2014-04-09 13:35:39 +0000</bug_when>
    <thetext>I don&apos;t see a particularly compelling argument to change the spec and implementations here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103645</commentid>
    <comment_count>5</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2014-04-09 22:58:59 +0000</bug_when>
    <thetext>WebKit also follows the spec:

http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/xml/DOMParser.cpp

I&apos;m not sure what the original poster is referring to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103646</commentid>
    <comment_count>6</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-04-09 23:42:11 +0000</bug_when>
    <thetext>The latest version of Safari on OS 10.8, for example, has different behavior from WebKit nightlies here.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>