Skip to content

Commit

Permalink
[] (0) how to handle XML files
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@512 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 26, 2007
1 parent fde4024 commit 53ca3a2
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 13 deletions.
43 changes: 37 additions & 6 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -18389,20 +18389,27 @@ XXX selection ranges -->

<li>
<p>If <var title="">type</var> is one of the following types, jump to the
appropriate section below and process the resource as described there:</p>
appropriate entry in the following list and process the resource as
described there:</p>

<dl class=switch>
<dt>"text/html"

<dd><a href="#page-load2" title=navigate-html>An HTML document</a>
<dd>Follow the steps given in the <a href="#page-load2"
title=navigate-html>HTML document</a> section, and abort these steps.

<dt>"application/xml"

<dd><a href="#page-load3" title=navigate-xml>An XML document</a>
<dd>Follow the steps given in the <a href="#page-load3"
title=navigate-xml>XML document</a> section. If that section determines
that the content is <em>not</em> to be displayed as a generic XML
document, then proceed to the next step in this overall set of steps.
Otherwise, abort these steps.

<dt>"text/plain"

<dd><a href="#page-load4" title=navigate-text>A plain text file</a>
<dd>Follow the steps given in the <a href="#page-load4"
title=navigate-text>plain text file</a> section, and abort these steps.
</dl>

<li>
Expand Down Expand Up @@ -18583,8 +18590,32 @@ XXX selection ranges -->
<h4 id=read-xml><span class=secno>4.1.3. </span><dfn id=page-load3
title=navigate-xml>Page load processing model for XML files</dfn></h4>

<p class=big-issue>Must make sure we don't step on the toes of other
specifications.
<p>When faced with displaying an XML file inline, user agents must first
create a <code>Document</code> object, following the requirements of the
XML and Namespaces in XML recommendations, RFC 3023, DOM3 Core, and other
relevant specifications. <a href="#refsXML">[XML]</a> <a
href="#refsXMLNS">[XMLNS]</a> <a href="#refsRFC3023">[RFC3023]</a> <a
href="#refsDOM3CORE">[DOM3CORE]</a>

<p>The actual HTTP headers and other metadata, not the headers as mutated
or implied by the algorithms given in this specification, are the ones
that must be used when determining the character encoding according to the
rules given in the above specifications.

<p>User agents may examine the namespace of the root <code>Element</code>
node of this <code>Document</code> object to perform namespace-based
dispatch to alternative processing tools, e.g. determining that the
content is actually a syndication feed and passing it to a feed handler.
If such processing is to take place, abort the steps in this section, and
jump to step 10 in the <a href="#navigate">navigate</a> steps above.

<p>Otherwise, then, with the newly created <code>Document</code>, the user
agents must <a href="#update">update the session history with the new
page</a>. User agents may do this before the complete document has been
parsed (thus achieving <i>incremental rendering</i>).

<p>Error messages from the parse process (e.g. namespace well-formedness
errors) may be reported inline by mutating the <code>Document</code>.

<h4 id=read-text><span class=secno>4.1.4. </span><dfn id=page-load4
title=navigate-text>Page load processing model for text files</dfn></h4>
Expand Down
55 changes: 48 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -16385,15 +16385,26 @@ XXX selection ranges -->
sniffing">the sniffed type of the resource</span>.</p></li>

<li><p>If <var title="">type</var> is one of the following types,
jump to the appropriate section below and process the resource as
described there:</p>
jump to the appropriate entry in the following list and process the
resource as described there:</p>
<dl class="switch">

<dt>"text/html"</dt>
<dd><span title="navigate-html">An HTML document</span></dd>
<dd>Follow the steps given in the <span title="navigate-html">HTML
document</span> section, and abort these steps.</dd>

<dt>"application/xml"</dt>
<dd><span title="navigate-xml">An XML document</span></dd>
<dd>Follow the steps given in the <span title="navigate-xml">XML
document</span> section. If that section determines that the
content is <em>not</em> to be displayed as a generic XML document,
then proceed to the next step in this overall set of
steps. Otherwise, abort these steps.</dd>

<dt>"text/plain"</dt>
<dd><span title="navigate-text">A plain text file</span></dd>
<dd>Follow the steps given in the <span
title="navigate-text">plain text file</span> section, and abort
these steps.</dd>

</dl>
</li>

Expand Down Expand Up @@ -16561,8 +16572,38 @@ XXX selection ranges -->

<h4 id="read-xml"><dfn title="navigate-xml">Page load processing model for XML files</dfn></h4>

<p class="big-issue">Must make sure we don't step on the toes of
other specifications.</p>
<p>When faced with displaying an XML file inline, user agents must
first create a <code>Document</code> object, following the
requirements of the XML and Namespaces in XML recommendations, RFC
3023, DOM3 Core, and other relevant specifications. <a
href="#refsXML">[XML]</a> <a href="#refsXMLNS">[XMLNS]</a> <a
href="#refsRFC3023">[RFC3023]</a> <a
href="#refsDOM3CORE">[DOM3CORE]</a></p>

<p>The actual HTTP headers and other metadata, not the headers as
mutated or implied by the algorithms given in this specification,
are the ones that must be used when determining the character
encoding according to the rules given in the above
specifications.</p>

<p>User agents may examine the namespace of the root
<code>Element</code> node of this <code>Document</code> object to
perform namespace-based dispatch to alternative processing tools,
e.g. determining that the content is actually a syndication feed and
passing it to a feed handler. If such processing is to take place,
abort the steps in this section, and jump to step 10 in the
<span>navigate</span> steps above.</p>

<p>Otherwise, then, with the newly created <code>Document</code>,
the user agents must <span>update the session history with the new
page</span>. User agents may do this before the complete document
has been parsed (thus achieving <i>incremental rendering</i>).</p>

<p>Error messages from the parse process (e.g. namespace
well-formedness errors) may be reported inline by mutating the
<code>Document</code>.</p>

xxxxxxxxxxxxxxxxxxxxxxx


<h4 id="read-text"><dfn title="navigate-text">Page load processing model for text files</dfn></h4>
Expand Down

0 comments on commit 53ca3a2

Please sign in to comment.