Skip to content

Commit

Permalink
[e] (0) Add a note about how namespaces aren't supported.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7510

git-svn-id: http://svn.whatwg.org/webapps@3956 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 22, 2009
1 parent 8bc1f8b commit ecfb9af
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
24 changes: 24 additions & 0 deletions index
Expand Up @@ -61296,6 +61296,30 @@ interface <dfn id=messageport>MessagePort</dfn> {
an <a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous
ampersand</a>.</p>

<div class=note>

<p>The HTML syntax does not support namespace
declarations, even in <a href=#foreign-elements>foreign elements</a>.</p>

<p>For instance, consider the following HTML fragment:</p>

<pre>&lt;p&gt;
&lt;svg&gt;
&lt;metadata&gt;
&lt;!-- this is invalid --&gt;
&lt;cdr:license xmlns:cdr="http://www.example.com/cdr/metadata" name="MIT"/&gt;
&lt;/metadata&gt;
&lt;/svg&gt;
&lt;/p&gt;</pre>

<p>The innermost element, <code title="">cdr:license</code>, is
actually in the SVG namespace, as the "<code title="">xmlns:cdr</code>" attribute has no effect (unlike in
XML). In fact, as the comment in the fragment above says, the
fragment is actually non-conforming. This is because the SVG
specification does not define any elements called "<code title="">cdr:license</code>" in the SVG namespace.</p>

</div>

<p><a href=#normal-elements>Normal elements</a> can have <a href=#syntax-text title=syntax-text>text</a>, <a href=#syntax-charref title=syntax-charref>character references</a>, other <a href=#syntax-elements title=syntax-elements>elements</a>, and <a href=#syntax-comments title=syntax-comments>comments</a>, but the text must not
contain the character U+003C LESS-THAN SIGN (<code>&lt;</code>) or
an <a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous
Expand Down
26 changes: 26 additions & 0 deletions source
Expand Up @@ -75829,6 +75829,32 @@ interface <dfn>MessagePort</dfn> {
an <span title="syntax-ambiguous-ampersand">ambiguous
ampersand</span>.</p>

<div class="note">

<p>The HTML syntax does not support namespace
declarations, even in <span>foreign elements</span>.</p>

<p>For instance, consider the following HTML fragment:</p>

<pre>&lt;p>
&lt;svg>
&lt;metadata>
&lt;!-- this is invalid -->
&lt;cdr:license xmlns:cdr="http://www.example.com/cdr/metadata" name="MIT"/>
&lt;/metadata>
&lt;/svg>
&lt;/p></pre>

<p>The innermost element, <code title="">cdr:license</code>, is
actually in the SVG namespace, as the "<code
title="">xmlns:cdr</code>" attribute has no effect (unlike in
XML). In fact, as the comment in the fragment above says, the
fragment is actually non-conforming. This is because the SVG
specification does not define any elements called "<code
title="">cdr:license</code>" in the SVG namespace.</p>

</div>

<p><span>Normal elements</span> can have <span
title="syntax-text">text</span>, <span
title="syntax-charref">character references</span>, other <span
Expand Down

0 comments on commit ecfb9af

Please sign in to comment.