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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>94149</bug_id>
          
          <creation_ts>2012-08-15 14:28:31 -0700</creation_ts>
          <short_desc>DTD extension - trailing ]&gt;</short_desc>
          <delta_ts>2012-08-17 14:33:01 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>9280</dup_id>
          
          <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>0</everconfirmed>
          <reporter>fhp.mail</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>696379</commentid>
    <comment_count>0</comment_count>
    <who name="">fhp.mail</who>
    <bug_when>2012-08-15 14:28:31 -0700</bug_when>
    <thetext>Using a combination of a W3C DTD such as XHTML1.1 and some extra XML parsing rules:

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot; [
&lt;!ENTITY % Misc.extra &quot;| tree&quot; &gt;
]&gt;

Results in a trailing ]&gt; at the beginning of the page, although the pages validates correctly and allows &lt;tree&gt; tags as valid markup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>696393</commentid>
    <comment_count>1</comment_count>
    <who name="">fhp.mail</who>
    <bug_when>2012-08-15 14:44:28 -0700</bug_when>
    <thetext>[Can&apos;t figure out how to add, so sorry for that in advance]

Actually, the issue applies to literally any inline DTD.

This, for example, is a rehashing of XHTML1.1 with an entity:

&lt;!DOCTYPE html [
&lt;!ENTITY % xhtml11.dtd
     PUBLIC &quot;-//W3C//XHTML 1.1//EN&quot;
            &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot; &gt;
%xhtml11.dtd;
]&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>696637</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-15 19:20:15 -0700</bug_when>
    <thetext>This is correct behavior, please see original bug for discussion. You are serving the document as HTML, so XML parsing rules do not apply to it.

*** This bug has been marked as a duplicate of bug 9280 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698397</commentid>
    <comment_count>3</comment_count>
    <who name="">fhp.mail</who>
    <bug_when>2012-08-17 09:12:49 -0700</bug_when>
    <thetext>I am serving the document as XHTML, thus I should be able to include an XML-style DTD in either inline or referenced format.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698407</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-17 09:26:59 -0700</bug_when>
    <thetext>Please provide an URL for the document for testing. 

Unless Content-Type is one of XHTML ones as described in &lt;http://www.w3.org/TR/xhtml-media-types/&gt;, the document is parsed as HTML.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698440</commentid>
    <comment_count>5</comment_count>
    <who name="">fhp.mail</who>
    <bug_when>2012-08-17 10:04:07 -0700</bug_when>
    <thetext>I&apos;m trying to develop a &quot;portable&quot; application, so I cannot use server-side changing of HTTP headers - and I&apos;m currently unaware of a way to do it in plain HTML.

I was of the impression that an XML declaration (and I&apos;m using the xmlns &lt;html&gt; attribute, just in case) should suffice for a document to be interpreted as xhtml.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698474</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-17 10:38:59 -0700</bug_when>
    <thetext>That is incorrect. Browsers look at Content-Type HTTP header field to determine whether a document is HTML or XML, never at content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>698659</commentid>
    <comment_count>7</comment_count>
    <who name="">fhp.mail</who>
    <bug_when>2012-08-17 14:33:01 -0700</bug_when>
    <thetext>In that case, I&apos;ll just have to go with .xht(ml) since it seems it renders properly that way. Too bad it&apos;s registered by older operating systems.

One would think that XHTML is something to wish for in HTML, but alas, it seems not. I fail to see what backward compatibility problems allowing nested &lt;&gt; in the context of DTDs would cause, but I guess I&apos;ll just have to wait for a few years.

But really, XML declaration and DTD and a plain .html is not considered XHTML? Really?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>