Skip to content

Commit

Permalink
Set createDocument() content type from namespace
Browse files Browse the repository at this point in the history
Fixes #217.
  • Loading branch information
ayg committed Apr 13, 2016
1 parent c8ae9cb commit 631d517
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@ The <dfn export>XML namespace</dfn> is
The <dfn export>XMLNS namespace</dfn> is
<code>http://www.w3.org/2000/xmlns/</code>.

The <dfn export>SVG namespace</dfn> is
<code>http://www.w3.org/2000/svg</code>.

The <dfn export>MathML namespace</dfn> is
<code>http://www.w3.org/1998/Math/MathML</code>.

To <dfn export>validate</dfn> a <var>qualifiedName</var>, run these steps:

<ol>
Expand Down Expand Up @@ -5089,6 +5095,23 @@ method, when invoked, must run these steps:
<li><p><var>document</var>'s <a>origin</a> is the <a>origin</a> of the <a>context object</a>'s
associated <a>document</a>. [[!HTML]]

<li><p><var>document</var>'s <a for=Document>content type</a> is determined by
<var>namespace</var>:

<dl class=switch>
<dt><a>HTML namespace</a>
<dd><code>application/xhtml+xml</code>

<dt><a>SVG namespace</a>
<dd><code>image/svg+xml</code>

<dt><a>MathML namespace</a>
<dd><code>application/mathml+xml</code>

<dt>Any other namespace
<dd><code>application/xml</code>
</dl>

<li><p>Return <var>document</var>.
</ol>

Expand Down

0 comments on commit 631d517

Please sign in to comment.