Treat the empty string as null for getAttributeNS, hasAttributeNS and removeAttributeNS as well. Ack David Flanagan.
authorMs2ger <ms2ger@gmail.com>
Fri, 26 Aug 2011 14:11:18 +0200
changeset 72913f51d09d178
parent 728 cdc2e1b35166
child 730 f1ac828a0830
Treat the empty string as null for getAttributeNS, hasAttributeNS and removeAttributeNS as well. Ack David Flanagan.
http://lists.w3.org/Archives/Public/www-dom/2011JulSep/0139.html
Overview.html
Overview.src.html
dom-core.html
     1.1 --- a/Overview.html	Fri Aug 26 14:04:55 2011 +0200
     1.2 +++ b/Overview.html	Fri Aug 26 14:11:18 2011 +0200
     1.3 @@ -3650,14 +3650,20 @@
     1.4  
     1.5  <p>The
     1.6  <dfn id="dom-element-getattributens" title="dom-Element-getAttributeNS"><code>getAttributeNS(<var title="">namespace</var>, <var title="">localName</var>)</code></dfn>
     1.7 -method must return the <a href="#concept-attribute-value" title="concept-attribute-value">value</a> of the
     1.8 -<a href="#concept-attribute" title="concept-attribute">attribute</a> in the
     1.9 -<a href="#context-object">context object</a>'s
    1.10 -<code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    1.11 -<a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    1.12 -<var title="">namespace</var> and
    1.13 -<a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    1.14 -<var title="">localName</var>, or null otherwise.
    1.15 +method must return the following steps:
    1.16 +<ol>
    1.17 +  <li><p>If <var title="">namespace</var> is the empty string, let
    1.18 +  <var title="">namespace</var> be null.
    1.19 +
    1.20 +  <li><p>Return the <a href="#concept-attribute-value" title="concept-attribute-value">value</a> of the
    1.21 +  <a href="#concept-attribute" title="concept-attribute">attribute</a> in the
    1.22 +  <a href="#context-object">context object</a>'s
    1.23 +  <code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    1.24 +  <a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    1.25 +  <var title="">namespace</var> and
    1.26 +  <a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    1.27 +  <var title="">localName</var>, if it has one, or null otherwise.
    1.28 +</ol>
    1.29  
    1.30  <p>The
    1.31  <dfn id="dom-element-setattribute" title="dom-Element-setAttribute"><code>setAttribute(<var title="">qualifiedName</var>, <var title="">value</var>)</code></dfn>
    1.32 @@ -3796,13 +3802,19 @@
    1.33  
    1.34  <p>The
    1.35  <dfn id="dom-element-removeattributens" title="dom-Element-removeAttributeNS"><code>removeAttributeNS(<var>namespace</var>, <var>localName</var>)</code></dfn>
    1.36 -method must remove the <a href="#concept-attribute" title="concept-attribute">attribute</a> in the
    1.37 -<a href="#context-object">context object</a>'s
    1.38 -<code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    1.39 -<a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    1.40 -<var title="">namespace</var> and
    1.41 -<a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    1.42 -<var title="">localName</var>
    1.43 +method must return the following steps:
    1.44 +<ol>
    1.45 +  <li><p>If <var title="">namespace</var> is the empty string, let
    1.46 +  <var title="">namespace</var> be null.
    1.47 +
    1.48 +  <li><p>Remove the <a href="#concept-attribute" title="concept-attribute">attribute</a> in the
    1.49 +  <a href="#context-object">context object</a>'s
    1.50 +  <code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    1.51 +  <a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    1.52 +  <var title="">namespace</var> and
    1.53 +  <a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    1.54 +  <var title="">localName</var>, if any.
    1.55 +</ol>
    1.56  
    1.57  <p>The
    1.58  <dfn id="dom-element-hasattribute" title="dom-Element-hasAttribute"><code>hasAttribute(<var>qualifiedName</var>)</code></dfn>
    1.59 @@ -3823,13 +3835,19 @@
    1.60  
    1.61  <p>The
    1.62  <dfn id="dom-element-hasattributens" title="dom-Element-hasAttributeNS"><code>hasAttributeNS(<var title="">namespace</var>, <var title="">localName</var>)</code></dfn>
    1.63 -method must return true if <a href="#context-object">context object</a>'s
    1.64 -<code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> contains an
    1.65 -<a href="#concept-attribute" title="concept-attribute">attribute</a> whose
    1.66 -<a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    1.67 -<var title="">namespace</var> and
    1.68 -<a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    1.69 -<var title="">localName</var>, or false otherwise.
    1.70 +method must return the following steps:
    1.71 +<ol>
    1.72 +  <li><p>If <var title="">namespace</var> is the empty string, let
    1.73 +  <var title="">namespace</var> be null.
    1.74 +
    1.75 +  <li><p>Return true if <a href="#context-object">context object</a>'s
    1.76 +  <code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> contains an
    1.77 +  <a href="#concept-attribute" title="concept-attribute">attribute</a> whose
    1.78 +  <a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    1.79 +  <var title="">namespace</var> and
    1.80 +  <a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    1.81 +  <var title="">localName</var>, or false otherwise.
    1.82 +</ol>
    1.83  
    1.84  <!--<dfn title=dom-Element-getAttributeNode>getAttributeNode</dfn>: when the
    1.85  Element.getAttributeNode() method is invoked on an HTML element, the name
     2.1 --- a/Overview.src.html	Fri Aug 26 14:04:55 2011 +0200
     2.2 +++ b/Overview.src.html	Fri Aug 26 14:11:18 2011 +0200
     2.3 @@ -3631,14 +3631,20 @@
     2.4  
     2.5  <p>The
     2.6  <dfn title=dom-Element-getAttributeNS><code>getAttributeNS(<var title>namespace</var>, <var title>localName</var>)</code></dfn>
     2.7 -method must return the <span title=concept-attribute-value>value</span> of the
     2.8 -<span title=concept-attribute>attribute</span> in the
     2.9 -<span>context object</span>'s
    2.10 -<code title=dom-Element-attributes>attributes</code> whose
    2.11 -<span title=concept-attribute-namespace>namespace</span> is
    2.12 -<var title>namespace</var> and
    2.13 -<span title=concept-attribute-local-name>local name</span> is
    2.14 -<var title>localName</var>, or null otherwise.
    2.15 +method must return the following steps:
    2.16 +<ol>
    2.17 +  <li><p>If <var title>namespace</var> is the empty string, let
    2.18 +  <var title>namespace</var> be null.
    2.19 +
    2.20 +  <li><p>Return the <span title=concept-attribute-value>value</span> of the
    2.21 +  <span title=concept-attribute>attribute</span> in the
    2.22 +  <span>context object</span>'s
    2.23 +  <code title=dom-Element-attributes>attributes</code> whose
    2.24 +  <span title=concept-attribute-namespace>namespace</span> is
    2.25 +  <var title>namespace</var> and
    2.26 +  <span title=concept-attribute-local-name>local name</span> is
    2.27 +  <var title>localName</var>, if it has one, or null otherwise.
    2.28 +</ol>
    2.29  
    2.30  <p>The
    2.31  <dfn title=dom-Element-setAttribute><code>setAttribute(<var title>qualifiedName</var>, <var title>value</var>)</code></dfn>
    2.32 @@ -3777,13 +3783,19 @@
    2.33  
    2.34  <p>The
    2.35  <dfn title=dom-Element-removeAttributeNS><code>removeAttributeNS(<var>namespace</var>, <var>localName</var>)</code></dfn>
    2.36 -method must remove the <span title=concept-attribute>attribute</span> in the
    2.37 -<span>context object</span>'s
    2.38 -<code title=dom-Element-attributes>attributes</code> whose
    2.39 -<span title=concept-attribute-namespace>namespace</span> is
    2.40 -<var title>namespace</var> and
    2.41 -<span title=concept-attribute-local-name>local name</span> is
    2.42 -<var title>localName</var>
    2.43 +method must return the following steps:
    2.44 +<ol>
    2.45 +  <li><p>If <var title>namespace</var> is the empty string, let
    2.46 +  <var title>namespace</var> be null.
    2.47 +
    2.48 +  <li><p>Remove the <span title=concept-attribute>attribute</span> in the
    2.49 +  <span>context object</span>'s
    2.50 +  <code title=dom-Element-attributes>attributes</code> whose
    2.51 +  <span title=concept-attribute-namespace>namespace</span> is
    2.52 +  <var title>namespace</var> and
    2.53 +  <span title=concept-attribute-local-name>local name</span> is
    2.54 +  <var title>localName</var>, if any.
    2.55 +</ol>
    2.56  
    2.57  <p>The
    2.58  <dfn title=dom-Element-hasAttribute><code>hasAttribute(<var>qualifiedName</var>)</code></dfn>
    2.59 @@ -3804,13 +3816,19 @@
    2.60  
    2.61  <p>The
    2.62  <dfn title=dom-Element-hasAttributeNS><code>hasAttributeNS(<var title>namespace</var>, <var title>localName</var>)</code></dfn>
    2.63 -method must return true if <span>context object</span>'s
    2.64 -<code title=dom-Element-attributes>attributes</code> contains an
    2.65 -<span title=concept-attribute>attribute</span> whose
    2.66 -<span title=concept-attribute-namespace>namespace</span> is
    2.67 -<var title>namespace</var> and
    2.68 -<span title=concept-attribute-local-name>local name</span> is
    2.69 -<var title>localName</var>, or false otherwise.
    2.70 +method must return the following steps:
    2.71 +<ol>
    2.72 +  <li><p>If <var title>namespace</var> is the empty string, let
    2.73 +  <var title>namespace</var> be null.
    2.74 +
    2.75 +  <li><p>Return true if <span>context object</span>'s
    2.76 +  <code title=dom-Element-attributes>attributes</code> contains an
    2.77 +  <span title=concept-attribute>attribute</span> whose
    2.78 +  <span title=concept-attribute-namespace>namespace</span> is
    2.79 +  <var title>namespace</var> and
    2.80 +  <span title=concept-attribute-local-name>local name</span> is
    2.81 +  <var title>localName</var>, or false otherwise.
    2.82 +</ol>
    2.83  
    2.84  <!--<dfn title=dom-Element-getAttributeNode>getAttributeNode</dfn>: when the
    2.85  Element.getAttributeNode() method is invoked on an HTML element, the name
     3.1 --- a/dom-core.html	Fri Aug 26 14:04:55 2011 +0200
     3.2 +++ b/dom-core.html	Fri Aug 26 14:11:18 2011 +0200
     3.3 @@ -3575,14 +3575,20 @@
     3.4  
     3.5  <p>The
     3.6  <dfn id="dom-element-getattributens" title="dom-Element-getAttributeNS"><code>getAttributeNS(<var title="">namespace</var>, <var title="">localName</var>)</code></dfn>
     3.7 -method must return the <a href="#concept-attribute-value" title="concept-attribute-value">value</a> of the
     3.8 -<a href="#concept-attribute" title="concept-attribute">attribute</a> in the
     3.9 -<a href="#context-object">context object</a>'s
    3.10 -<code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    3.11 -<a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    3.12 -<var title="">namespace</var> and
    3.13 -<a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    3.14 -<var title="">localName</var>, or null otherwise.
    3.15 +method must return the following steps:
    3.16 +<ol>
    3.17 +  <li><p>If <var title="">namespace</var> is the empty string, let
    3.18 +  <var title="">namespace</var> be null.
    3.19 +
    3.20 +  <li><p>Return the <a href="#concept-attribute-value" title="concept-attribute-value">value</a> of the
    3.21 +  <a href="#concept-attribute" title="concept-attribute">attribute</a> in the
    3.22 +  <a href="#context-object">context object</a>'s
    3.23 +  <code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    3.24 +  <a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    3.25 +  <var title="">namespace</var> and
    3.26 +  <a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    3.27 +  <var title="">localName</var>, if it has one, or null otherwise.
    3.28 +</ol>
    3.29  
    3.30  <p>The
    3.31  <dfn id="dom-element-setattribute" title="dom-Element-setAttribute"><code>setAttribute(<var title="">qualifiedName</var>, <var title="">value</var>)</code></dfn>
    3.32 @@ -3721,13 +3727,19 @@
    3.33  
    3.34  <p>The
    3.35  <dfn id="dom-element-removeattributens" title="dom-Element-removeAttributeNS"><code>removeAttributeNS(<var>namespace</var>, <var>localName</var>)</code></dfn>
    3.36 -method must remove the <a href="#concept-attribute" title="concept-attribute">attribute</a> in the
    3.37 -<a href="#context-object">context object</a>'s
    3.38 -<code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    3.39 -<a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    3.40 -<var title="">namespace</var> and
    3.41 -<a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    3.42 -<var title="">localName</var>
    3.43 +method must return the following steps:
    3.44 +<ol>
    3.45 +  <li><p>If <var title="">namespace</var> is the empty string, let
    3.46 +  <var title="">namespace</var> be null.
    3.47 +
    3.48 +  <li><p>Remove the <a href="#concept-attribute" title="concept-attribute">attribute</a> in the
    3.49 +  <a href="#context-object">context object</a>'s
    3.50 +  <code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> whose
    3.51 +  <a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    3.52 +  <var title="">namespace</var> and
    3.53 +  <a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    3.54 +  <var title="">localName</var>, if any.
    3.55 +</ol>
    3.56  
    3.57  <p>The
    3.58  <dfn id="dom-element-hasattribute" title="dom-Element-hasAttribute"><code>hasAttribute(<var>qualifiedName</var>)</code></dfn>
    3.59 @@ -3748,13 +3760,19 @@
    3.60  
    3.61  <p>The
    3.62  <dfn id="dom-element-hasattributens" title="dom-Element-hasAttributeNS"><code>hasAttributeNS(<var title="">namespace</var>, <var title="">localName</var>)</code></dfn>
    3.63 -method must return true if <a href="#context-object">context object</a>'s
    3.64 -<code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> contains an
    3.65 -<a href="#concept-attribute" title="concept-attribute">attribute</a> whose
    3.66 -<a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    3.67 -<var title="">namespace</var> and
    3.68 -<a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    3.69 -<var title="">localName</var>, or false otherwise.
    3.70 +method must return the following steps:
    3.71 +<ol>
    3.72 +  <li><p>If <var title="">namespace</var> is the empty string, let
    3.73 +  <var title="">namespace</var> be null.
    3.74 +
    3.75 +  <li><p>Return true if <a href="#context-object">context object</a>'s
    3.76 +  <code title="dom-Element-attributes"><a href="#dom-element-attributes">attributes</a></code> contains an
    3.77 +  <a href="#concept-attribute" title="concept-attribute">attribute</a> whose
    3.78 +  <a href="#concept-attribute-namespace" title="concept-attribute-namespace">namespace</a> is
    3.79 +  <var title="">namespace</var> and
    3.80 +  <a href="#concept-attribute-local-name" title="concept-attribute-local-name">local name</a> is
    3.81 +  <var title="">localName</var>, or false otherwise.
    3.82 +</ol>
    3.83  
    3.84  <!--<dfn title=dom-Element-getAttributeNode>getAttributeNode</dfn>: when the
    3.85  Element.getAttributeNode() method is invoked on an HTML element, the name