Skip to content

Commit

Permalink
clarify minor things about HTML Documents vs XML Documents
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@234 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 1, 2006
1 parent 36f7fd1 commit 3c8377c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 23 deletions.
38 changes: 25 additions & 13 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,13 @@ and suggestions on this to the list, btw).
behaviour of certain APIs, as well as a few CSS rendering rules. <a
href="#refsCSS21">[CSS21]</a>

<p class=note>A <code>Document</code> object created by the <code
title="">createDocument()</code> API on the <code>DOMImplementation</code>
object is initially an <a href="#xml-documents" title="XML documents">XML
document</a>, but can be made into an <a href="#html-" title="HTML
documents">HTML document</a> by calling <code title=dom-document-open><a
href="#open">document.open()</a></code> on it.

<p>All <code>Document</code> objects (in user agents implementing this
specification) must also implement the <code><a
href="#htmldocument">HTMLDocument</a></code> interface, available using
Expand Down Expand Up @@ -2418,9 +2425,9 @@ should the click, focus, blur methods be recursible?

<p>For <a href="#html-">HTML documents</a>, and for <a
href="#html-elements">HTML elements</a> in <a href="#html-">HTML
documents</a>, certain APIs become case-insensitive or case-changing, as
sometimes defined in DOM3 Core, and as summarised or required below. <a
href="#refsDOM3CORE">[DOM3CORE]</a>.
documents</a>, certain APIs defined in DOM3 Core become case-insensitive
or case-changing, as sometimes defined in DOM3 Core, and as summarised or
required below. <a href="#refsDOM3CORE">[DOM3CORE]</a>.

<p>This does not apply to <a href="#xml-documents">XML documents</a> or to
elements that are not in the <a href="#html-namespace0">HTML namespace</a>
Expand Down Expand Up @@ -2500,10 +2507,10 @@ should the click, focus, blur methods be recursible?
markup into the document.

<p>Because these APIs interact with the parser, their behaviour varies
depending on whether they are used with HTML (and the <a
href="#html-0">HTML parser</a>) or XHTML (and the <span>XML
parser</span>). The following table cross-references the various versions
of these APIs.
depending on whether they are used with <a href="#html-">HTML
documents</a> (and the <a href="#html-0">HTML parser</a>) or XHTML in <a
href="#xml-documents">XML documents</a> (and the <span>XML parser</span>).
The following table cross-references the various versions of these APIs.

<table>
<thead>
Expand All @@ -2517,7 +2524,7 @@ should the click, focus, blur methods be recursible?

<tbody>
<tr>
<th>In <a href="#html-">HTML documents</a>
<th>For documents that are <a href="#html-">HTML documents</a>

<td><a href="#document.write0"
title=dom-document-write-HTML><code>document.write()</code> in HTML</a>
Expand All @@ -2526,7 +2533,7 @@ should the click, focus, blur methods be recursible?
title=dom-innerHTML-HTML><code>innerHTML</code> in HTML</a>

<tr>
<th>In <a href="#xml-documents">XML documents</a>
<th>For documents that are <a href="#xml-documents">XML documents</a>

<td><a href="#document.write1"
title=dom-document-write-XML><code>document.write()</code> in XML</a>
Expand Down Expand Up @@ -2602,7 +2609,7 @@ should the click, focus, blur methods be recursible?
before emitting an end-of-file token).

<li>Mark the document as being an <a href="#html-" title="HTML
documents">HTML document</a>.</li>
documents">HTML document</a> (it might already be so-marked).</li>
<!-- text/plain handling -->

<li>
Expand Down Expand Up @@ -2873,10 +2880,15 @@ should the click, focus, blur methods be recursible?
<li>
<p>The user agent must create a new <a href="#html-0">HTML parser</a>, in
its initial state, and associate it with the <code>Document</code> node.</p>

</li>
<!-- redundant, the document is forcably already so labelled if we get here
<li>
<p>The user agent must mark the <code>Document</code> object as being an
<a href="#html-" title="HTML documents">HTML document</a>.</p>

<p>The user agent must mark the <code>Document</code> object as
being an <span title="HTML documents">HTML document</span>.</p>

</li>
-->

<li>
<p>The user agent must place into the <a href="#input0">input stream</a>
Expand Down
30 changes: 20 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,13 @@ and suggestions on this to the list, btw).
certain APIs, as well as a few CSS rendering rules. <a
href="#refsCSS21">[CSS21]</a></p>

<p class="note">A <code>Document</code> object created by the <code
title="">createDocument()</code> API on the
<code>DOMImplementation</code> object is initially an <span
title="XML documents">XML document</span>, but can be made into an
<span title="HTML documents">HTML document</span> by calling <code
title="dom-document-open">document.open()</code> on it.</p>

<p>All <code>Document</code> objects (in user agents implementing
this specification) must also implement the
<code>HTMLDocument</code> interface, available using
Expand Down Expand Up @@ -1417,9 +1424,9 @@ should the click, focus, blur methods be recursible?
<!-- XXX case-sensitivity training required here. -->

<p>For <span>HTML documents</span>, and for <span>HTML
elements</span> in <span>HTML documents</span>, certain APIs become
case-insensitive or case-changing, as sometimes defined in DOM3
Core, and as summarised or required below. <a
elements</span> in <span>HTML documents</span>, certain APIs defined
in DOM3 Core become case-insensitive or case-changing, as sometimes
defined in DOM3 Core, and as summarised or required below. <a
href="#refsDOM3CORE">[DOM3CORE]</a>.</p>

<p>This does not apply to <span>XML documents</span> or to elements
Expand Down Expand Up @@ -1529,10 +1536,11 @@ should the click, focus, blur methods be recursible?
document.</p>

<p>Because these APIs interact with the parser, their behaviour
varies depending on whether they are used with HTML (and the
<span>HTML parser</span>) or XHTML (and the <span>XML
parser</span>). The following table cross-references the various
versions of these APIs.</p>
varies depending on whether they are used with <span>HTML
documents</span> (and the <span>HTML parser</span>) or XHTML in
<span>XML documents</span> (and the <span>XML parser</span>). The
following table cross-references the various versions of these
APIs.</p>

<table>
<thead>
Expand All @@ -1544,12 +1552,12 @@ should the click, focus, blur methods be recursible?
</thead>
<tbody>
<tr>
<th>In <span>HTML documents</span></th>
<th>For documents that are <span>HTML documents</span></th>
<td><span title="dom-document-write-HTML"><code>document.write()</code> in HTML</span></td>
<td><span title="dom-innerHTML-HTML"><code>innerHTML</code> in HTML</span></td>
</tr>
<tr>
<th>In <span>XML documents</span></th>
<th>For documents that are <span>XML documents</span></th>
<td><span title="dom-document-write-XML"><code>document.write()</code> in XML</span></td>
<td><span title="dom-innerHTML-XML"><code>innerHTML</code> in XML</span></td>
</tr>
Expand Down Expand Up @@ -1622,7 +1630,7 @@ should the click, focus, blur methods be recursible?
an end-of-file token).</p></li>

<li>Mark the document as being an <span title="HTML documents">HTML
document</span>.</li>
document</span> (it might already be so-marked).</li>

<!-- text/plain handling --><li><p>If <var title="">type</var> does
not have the value "<code>text/html</code>"<!-- XXX matched how?
Expand Down Expand Up @@ -1938,12 +1946,14 @@ should the click, focus, blur methods be recursible?

</li>

<!-- redundant, the document is forcably already so labelled if we get here
<li>

<p>The user agent must mark the <code>Document</code> object as
being an <span title="HTML documents">HTML document</span>.</p>

</li>
-->

<li>

Expand Down

0 comments on commit 3c8377c

Please sign in to comment.