Errata of the Document Object Model Level 2 Specifications
Errata of the Document Object Model Level 2
Specifications
This version:
$Date: 2005/01/19 13:58:28 $
Copyright © 2000
W3C
MIT
INRIA
Keio
), All Rights
Reserved. W3C
liability
trademark
document use
and
software licensing
rules apply.
About the Document Object Model Level 2 Specifications
The
Document Object Model Level 2
Specifications
was produced by the
Document
Object Model Working Group (
DOM WG
as part of the
Document Object Model Activity
This document lists the known errata to the Document Object Model Level
2 specifications. Each entry has the following information:
A unique entry number.
The date it was added to the errata page.
Whether the entry is considered an important error, a minor
typographical error, a clarification, or a known problem with the document
itself.
The guidelines version and section referred to.
A description of the problem and correction if applicable.
Please send general comments about this document to the public mailing
list
www-dom@w3.org
. An
archive
is available at
DOM Level 2 Core
core-1. 2001-01-17. [minor typographical error].
Clarification
of Extended interfaces introduction
The following sentence should be removed since it is in the
DOM HTML specification:
As such, HTML-only DOM
implementations [DOM Level 2 HTML] do not need to have objects that
implement these interfaces.
core-2. 2001-01-17. [clarification].
Node.appendChild
The sentence:
DOMException.NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
should read:
DOMException.NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if
the previous parent of the node being inserted is readonly.
core-3a. 2001-05-09. [error].
DOMImplementation.createDocument
The description:
Creates an XML Document object of the specified type with its
document element. HTML-only DOM implementations do not need to
implement this method..
should read:
Creates a DOM Document object of the specified type with its document
element.
The exception:
DOMException.NAMESPACE_ERR: Raised if the qualifiedName is malformed,
if the qualifiedName has a prefix and the namespaceURI is null, or if
the qualifiedName has a prefix that is "xml" and the namespaceURI is
different from "http://www.w3.org/XML/1998/namespace" [Namespaces].
should read:
DOMException.NAMESPACE_ERR: Raised if the qualifiedName is malformed,
if the qualifiedName has a prefix and the namespaceURI is null, or if
the qualifiedName has a prefix that is "xml" and the namespaceURI is
different from "http://www.w3.org/XML/1998/namespace" [Namespaces], or
if the DOM implementation does not support the "XML" feature but a
non-null namespace URI was provided, since namespaces were defined by
XML.
The following exception should be added:
DOMException.NOT_SUPPORTED_ERR: May be raised by DOM implementations
which do not support the "XML" feature, if they choose not to support
this method. Note: Other features introduced in the future,
by the DOM WG or in extensions defined by other groups, may also demand
support for this method; please consult the definition of the feature
to see if it requires this method.
core-3b. 2001-05-09. [error].
DOMImplementation.createDocumentType
The following sentence should be removed from the description:
HTML-only DOM implementations do not need to implement this method.
The following exception should be added:
DOMException.NOT_SUPPORTED_ERR: May be raised by DOM implementations
which do not support the "XML" feature, if they choose not to support
this method. Note: Other features introduced in the future,
by the DOM WG or in extensions defined by other groups, may also
demand support for this method; please consult the definition of the
feature to see if it requires this method.
core-3c. 2001-05-09. [error].
Document.createAttributeNS
The following sentence should be removed from the description:
HTML-only DOM implementations do not need to implement this method.
The following exception should be added:
DOMException.NOT_SUPPORTED_ERR: Always thrown if the current
document does not support the "XML" feature, since namespaces were
defined by XML.
(ditto for
Document.createElementNS
NamedNodeMap.setNamedItemNS
Element.setAttributeNS
Element.setAttributeNodeNS
core-3d. 2001-05-09. [error].
Element.getAttributeNS
The following sentence should be removed from the description:
HTML-only DOM implementations do not need to implement this method.
The following paragraph should be added in the description:
Documents which do not support the "XML" feature will permit only
the DOM Level 1 calls for creating/setting elements and
attributes. Hence, if you specify a non-null namespace URI, these DOMs
will never find a matching node.
(ditto for
Element.getAttributeNodeNS
Element.hasAttributeNS
Element.removeAttributeNS
Element.getElementsByTagNameNS
NamedNodeMap.getNamedItemNS
NamedNodeMap.removeNamedItemNS
core-4
. 2001-01-17. [clarification].
NamedNodeMap.setNamedItem
An exception is missing:
DOMException.HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
doesn't belong in this NamedNodeMap. Examples would include trying
to insert something other than an Attr node into an Element's map of
attributes, or a non-Entity node into the DocumentType's map of
Entities.
(ditto for
setNamedItemNS
core-5. 2001-01-17. [error].
DOMImplementation.hasFeature
The sentence:
To avoid possible conflicts, as a convention, names referring to
features defined outside the DOM specification should be made unique
by reversing the name of the Internet domain name of the person (or
the organization that the person belongs to) who defines the feature,
component by component, and using this as a prefix. For instance, the
W3C SVG Working Group defines the feature "org.w3c.dom.svg".
should read:
To avoid possible conflicts, as a convention, names referring to
features defined outside the DOM specification should be made unique.
core-6. 2001-01-31. [error].
Node.appendChild
The paragraph
DOMException.HIERARCHY_REQUEST_ERR: Raised if this node is of a
type that does not allow children of the type of the newChild node, or
if the node to append is one of this node's ancestors.
should read:
DOMException.HIERARCHY_REQUEST_ERR: Raised if this node is of a type
that does not allow children of the type of the newChild node, or if
the node to append is one of this node's ancestors or this node
itself.
core-7. 2001-01-31. [error].
Node.insertBefore
The paragraph
DOMException.HIERARCHY_REQUEST_ERR: Raised if this node is of a
type that does not allow children of the type of the newChild node, or
if the node to insert is one of this node's ancestors.
should read:
DOMException.HIERARCHY_REQUEST_ERR: Raised if this node is of a
type that does not allow children of the type of the newChild node, or
if the node to insert is one of this node's ancestors or this node
itself.
core-8. 2001-01-31. [error].
Node.replaceChild
The paragraph
DOMException.HIERARCHY_REQUEST_ERR: Raised if this node is of a
type that does not allow children of the type of the newChild node, or
if the node to put in is one of this node's ancestors.
should read:
DOMException.HIERARCHY_REQUEST_ERR: Raised if this node is of a
type that does not allow children of the type of the newChild node, or
if the node to put in is one of this node's ancestors or this node
itself.
core-9
. 2001-03-22. [clarification].
Document.createAttributeNS
The paragraph
DOMException.NAMESPACE_ERR: Raised if the qualifiedName is
malformed, if the qualifiedName has a prefix and the namespaceURI is
null, if the qualifiedName has a prefix that is "xml" and the
namespaceURI is different from "http://www.w3.org/XML/1998/namespace",
or if the qualifiedName is "xmlns" and the namespaceURI is different
from "http://www.w3.org/2000/xmlns/".
should read:
DOMException.NAMESPACE_ERR: Raised if the qualifiedName is
malformed, if the qualifiedName has a prefix and the namespaceURI is
null, if the qualifiedName has a prefix that is "xml" and the
namespaceURI is different from "http://www.w3.org/XML/1998/namespace",
or if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI
is different from "http://www.w3.org/2000/xmlns/".
(ditto for
Element.setAttributeNS
core-10
. 2001-05-09. [clarification].
Document.createAttributeNS
The paragraph
DOMException.INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character.
should read:
DOMException.INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character, per the XML 1.0
specification [XML].
The paragraph
DOMException.NAMESPACE_ERR: Raised if the qualifiedName is
malformed, if the qualifiedName has a prefix and the namespaceURI is
null, if the qualifiedName has a prefix that is "xml" and the
namespaceURI is different from "http://www.w3.org/XML/1998/namespace",
or if the qualifiedName is "xmlns" and the namespaceURI is different
from "http://www.w3.org/2000/xmlns/".
should read:
DOMException.NAMESPACE_ERR: Raised if the qualifiedName is malformed
per the Namespaces in XML specification, if the qualifiedName has a
prefix and the namespaceURI is null, if the qualifiedName has a prefix
that is "xml" and the namespaceURI is different from
"http://www.w3.org/XML/1998/namespace", or if the qualifiedName, or its
prefix, is "xmlns" and the namespaceURI is different from
"http://www.w3.org/2000/xmlns/".
(ditto for
Element.setAttributeNS
core-11
. 2001-05-09. [clarification].
Document.createElementNS
The paragraph
DOMException.INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character.
should read:
DOMException.INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character, per the XML 1.0
specification [XML].
The paragraph
NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the
qualifiedName has a prefix and the namespaceURI is null, or if the
qualifiedName has a prefix that is "xml" and the namespaceURI is
different from "http://www.w3.org/XML/1998/namespace" [Namespaces].
should read:
NAMESPACE_ERR: Raised if the qualifiedName is malformed per the
Namespaces in XML specification, if the qualifiedName has a prefix and
the namespaceURI is null, or if the qualifiedName has a prefix that is
"xml" and the namespaceURI is different from
"http://www.w3.org/XML/1998/namespace" [Namespaces].
core-12
. 2001-05-09. [clarification].
Node.prefix
The paragraph
DOMException.INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character.
should read:
DOMException.INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character, per the XML 1.0
specification [XML].
The paragraph
NAMESPACE_ERR: Raised if the specified prefix is malformed, if
the namespaceURI of this node is null, if the specified prefix is "xml"
and the namespaceURI of this node is different from
"http://www.w3.org/XML/1998/namespace", if this node is an attribute
and the specified prefix is "xmlns" and the namespaceURI of this node
is different from "http://www.w3.org/2000/xmlns/", or if this node is
an attribute and the qualifiedName of this node is "xmlns"
[Namespaces].
should read:
NAMESPACE_ERR: Raised if the specified prefix is malformed per the
Namespaces in XML specification, if the namespaceURI of this node is
null, if the specified prefix is "xml" and the namespaceURI of this
node is different from "http://www.w3.org/XML/1998/namespace", if this
node is an attribute and the specified prefix is "xmlns" and the
namespaceURI of this node is different from
"http://www.w3.org/2000/xmlns/", or if this node is an attribute and
the qualifiedName of this node is "xmlns" [Namespaces].
core-13
. 2001-05-09. [clarification].
DocumentType.internalSubset
The description
The internal subset as a string.
should read:
The internal subset as a string, or
null
if there is
none. This is does not contain the delimiting square brackets.
core-14
. 2001-07-11. [clarification].
DOMImplementation.hasFeature
The description of the version parameter
This is the version number of the feature to test. In Level 2,
the string can be either "2.0" or "1.0". If the version is not
specified, supporting any version of the feature causes the method to
return true.
should read:
This is the version number of the feature to test. In Level 2, the
string can be either "2.0" or "1.0". If the version is null or empty
string, supporting any version of the feature causes the method to
return true.
core-15
. 2001-07-11. [clarification].
DOMException
The description
Implementations should raise other exceptions under other
circumstances. For example, implementations should raise an
implementation-dependent exception if a null argument is
passed.
should read:
Implementations should raise other exceptions under other
circumstances. For example, implementations should raise an
implementation-dependent exception if a
null
argument is
passed when
null
was not expected.
core-16
. 2001-07-11. [clarification].
Entity
The description
This means that parsed entities declared in the external subset
need not be expanded by some classes of applications, and that the
replacement value of the entity may not be available. When the
replacement value is available, the corresponding Entity node's child
list represents the structure of that replacement text.
should read:
This means that parsed entities declared in the external subset need
not be expanded by some classes of applications, and that the
replacement text of the entity may not be available. When the
replacement
text
is available, the corresponding Entity node's child list
represents the structure of the replacement value.
core-17. 2001-07-11. [clarification].
createAttributeNS
The following sentence should be added:
Per [
XML
Namespaces
], applications must use the value
null
as the
namespaceURI parameter for methods if they wish to have no
namespace.
(ditto for
createElementNS
getAttributeNS
getAttributeNodeNS
hasAttributeNS
removeAttributeNS
setAttributeNS
setAttributeNodeNS
getNamedItemNS
removeNamedItemNS
setNamedItemNS
core-18
. 2001-07-11. [error].
Java bindings
The documentations in the Java source files contains errors and
formatting issues. This new
zip
file
should fix the problems.
core-19
. 2001-08-31. [clarification].
Element.removeAttribute
The following sentence is missing in the description:
If the attribute does not have a specified or default value, calling
this method has no effect.
(ditto for
removeAttributeNS
core-20a. 2003-02-06. [error].
DOMImplementation.createDocument
obsolete
core-3a
The description:
Creates an XML Document object of the specified type with its
document element. HTML-only DOM implementations do not need to
implement this method..
should read:
Creates a DOM Document object of the specified type with its document
element.
The following exception should be added:
DOMException.NOT_SUPPORTED_ERR: May be raised if the
implementation does not support the feature "XML" and the
language exposed through the Document does not support XML
Namespaces (such as [HTML4]).
core-20b. 2003-02-06. [error].
DOMImplementation.createDocumentType
. obsolete
core-3b
The following sentence should be removed from the description:
HTML-only DOM implementations do not need to implement
this method.
The following exception should be added:
DOMException.NOT_SUPPORTED_ERR: May be raised if the
implementation does not support the feature "XML" and the
language exposed through the Document does not support XML
Namespaces (such as [HTML4]).
core-20c. 2003-02-06. [error].
Document.createAttributeNS
. obsolete
core-3c
The following sentence should be removed from the description:
HTML-only DOM implementations do not need to implement
this method.
The following exception should be added:
DOMException.NOT_SUPPORTED_ERR: May be raised if the
implementation does not support the feature "XML" and the
language exposed through the Document does not support XML
Namespaces (such as [HTML4]).
(ditto for
Document.createElementNS
NamedNodeMap.setNamedItemNS
Element.setAttributeNS
Element.setAttributeNodeNS
core-20d. 2003-02-06. [error].
Element.getAttributeNS
. obsolete
core-3d
The following sentence should be removed from the description:
HTML-only DOM implementations do not need to implement this method.
The following exception should be added:
DOMException.NOT_SUPPORTED_ERR: May be raised if the
implementation does not support the feature "XML" and the
language exposed through the Document does not support XML
Namespaces (such as [HTML4]).
(ditto for
Element.getAttributeNodeNS
Element.hasAttributeNS
Element.removeAttributeNS
Element.getElementsByTagNameNS
NamedNodeMap.getNamedItemNS
NamedNodeMap.removeNamedItemNS
core-21
. 2002-02-14. [clarification].
Element.setAttributeNode
The sentence should be added to the description:
Replacing an attribute node by itself has no effect.
(ditto for
Element.setAttributeNodeNS
core-22
. 2002-02-14. [clarification].
NamedNodeMap.setNamedItem
The sentence should be added to the description:
Replacing a node by itself has no effect.
(ditto for
NamedNodeMap.setNamedItemNS
core-23
. 2002-02-14. [clarification].
DocumentType.systemId
The sentence should be added to the description:
This may be an absolute URI or not.
(ditto for
Entity.systemId
and
Notation.systemId
core-24. 2002-05-09. [clarification].
Node.nodeValue
The sentence
When it is defined to be null, setting it has no effect.
should read:
When it is defined to be null, setting it has no effect,
including if the node is read-only.
core-25. 2002-05-09. [clarification].
DocumentType
The following paragraph should be added in the description:
DocumentType nodes are read-only.
core-26. 2002-05-09. [error].
XML Namespaces
The description:
Note that because the DOM does no lexical checking, the empty
string will be treated as a real namespace URI in DOM Level 2
methods. Applications must use the value null as the
namespaceURI parameter for methods if they wish to have no
namespace.
should read:
Note that because some programming languages cannot
differenciate null from an empty string, and because an empty
string is not a valid namespace URI, even though the DOM does
no lexical checking, the way an empty string is treated, when
given as a namespace URI to a DOM Level 2 method, is
implementation dependent. Applications must use the value null
as the namespaceURI parameter for methods if they wish to have
no namespace.
core-27. 2003-02-06. [error].
XML Namespaces
. obsolete
core-26
The description:
Note that because the DOM does no lexical checking, the
empty string will be treated as a real namespace URI in DOM
Level 2 methods. Applications must use the value null as the
namespaceURI parameter for methods if they wish to have no
namespace.
should read:
Applications should use the value null as the namespaceURI
parameter for methods if they wish to have no namespace. In
programming languages where empty strings can be
differentiated from null, the way empty strings are treated,
when given as a namespace URI to a DOM Level 2 method, is
implementation dependent. This is true even though the DOM
does no lexical checking of URIs.
Note
: setAttributeNS(null, ...) put the attribute in
the per-element-type partitions.
core-28. 2002-10-16. [error].
Java bindings
. obsolete
core-18
The documentations in the Java source files didn't have content
for the set* methods. This new
zip
file
should fix the problems.
DOM Level 2 Traversal and Range
range-1
. 2001-01-17. [clarification].
Range.selectNode
An exception is missing:
DOMException.WRONG_DOCUMENT_ERR: Raised if refNode was created from a different
document than the one that created this range.
(ditto for
selectNodeContents
setStart
setStartAfter
setStartBefore
setEnd
setEndAfter
, and
setEndBefore
traversal-1. 2001-03-20. [clarification].
1.1.2. NodeFilters
The sentence:
For example: if the filtering for the current node
changes from FILTER_SHOW to FILTER_SKIP, a TreeWalker will be able to navigate off that node in any direction, but not back to it unless the filtering
conditions change again.
Should read:
For example: if the filtering for the current node changes from
FILTER_ACCEPT to FILTER_SKIP, a TreeWalker will be able to navigate off
that node in any direction, but not back to it unless the filtering
conditions change again.
traversal-2. 2001-03-20. [clarification].
NodeIterator.expandEntityReferences
The sentence:
If false, they and their descendants will be rejected.
Should read:
If false, these children and their descendants will be rejected.
(ditto for
TreeWalker.expandEntityReferences
traversal-3. 2001-03-20. [clarification].
iterator vs Iterator vs NodeIterator
Some instances of "iterator" and/or "Iterator" persist. Historically,
these were references to the general concept of fixup-based iteration,
which we thought might be reapplicable, but the WG decided to drop that
level of abstraction and most other references have already been changed
to
NodeIterator
. Changing the remaining instances improves
stylistic unity.
traversal-4
. 2001-08-22. [error].
createNodeIterator
The NodeFilter to be used with this TreeWalker, or null to
indicate no filter.
should read:
The NodeFilter to be used with this NodeIterator, or null to indicate
no filter.
traversal-range-1. 2001-07-11. [error].
Java bindings
The documentations in the Java source files contains errors and
formatting issues. This new
zip
file
should fix the problems.
traversal-range-2. 2002-10-16. [error].
Java bindings
. obsolete
traversal-range-1
The documentations in the Java source files didn't have content
for the set* methods. This new
zip
file
should fix the problems.
DOM Level 2 Views
views-1. 2001-07-11. [error].
Java bindings
The documentations in the Java source files contains errors and
formatting issues. This new
zip
file
should fix the problems.
views-2. 2002-10-16. [error].
Java bindings
. obsolete
views-1
The documentations in the Java source files didn't have content
for the set* methods. This new
zip
file
should fix the problems.
DOM Level 2 Events
events-1. 2001-07-11. [error].
Java bindings
The documentations in the Java source files contains errors and
formatting issues. This new
zip
file
should fix the problems.
events-2
. 2001-08-31. [error].
MutationEvent
Some instances of "DOMCharDataModified" appear in the descriptions,
they must be replaced by "DOMCharacterDataModified".
events-3. 2002-10-16. [error].
Java bindings
. obsolete
events-1
The documentations in the Java source files didn't have content
for the set* methods. This new
zip
file
should fix the problems.
DOM Level 2 Style
style-1. 2001-07-11. [error].
Java bindings
The documentations in the Java source files contains errors and
formatting issues. This new
zip
file
should fix the problems.
style-2
. 2001-08-31. [clarification].
CSSStyleDeclaration.getPropertyPriority
Used to retrieve the priority of a CSS property (e.g. the
"important" qualifier) if the property has been explicitly set in this
declaration block.
should read:
Used to retrieve the priority of a CSS property (e.g. the
"important" qualifier) if the priority has been explicitly set in this
declaration block.
and
A string representing the priority (e.g. "important") if one
exists. The empty string if none exists.
should read:
A string representing the priority (e.g. "important") if the
property has been explicitly set in this declaration block and has a
priority specified. The empty string otherwise.
style-3
. 2001-08-31. [clarification].
CSSStyleDeclaration.setPriority
The new priority of the property (e.g. "important").
should read:
The new priority of the property (e.g. "important") or the empty
string if none.
style-4
. 2001-08-31. [clarification].
CSSStyleDeclaration.setPriority
The following note should be added:
Note: setProperty permits to modify a property or add a new one in
the declaration block. Any call to this method may modify the order of
properties in the
item
method.
style-6. 2002-10-16. [error].
Java bindings
. obsolete
style-1
The documentations in the Java source files didn't have content
for the set* methods. This new
zip
file
should fix the problems.
DOM Level 2 HTML
html-1
. 2005-01-19. [clarification].
HTMLImageElement.src
The word:
URI
should read
absolute URI
(ditto for
HTMLImageElement.longDesc
html-2
. 2005-01-19. [error].
XHTML and the HTML DOM
The sentences:
For instance, element and attribute names are exposed as all
uppercase (for consistency) when used on an HTML document,
regardless of the character case used in the markup. Since XHTML
is based on XML, in XHTML everything is case sensitive, and
element and attribute names must be lowercase in the markup.
should read
For instance, element names are exposed as all uppercase (for
consistency) when used on an HTML document, regardless of the
character case used in the markup. The names of attributes
defined in HTML 4.01 are also exposed as all lowercase,
regardless of the character case used in the markup, but for
other attributes (i.e. ones that are not defined by HTML 4.01),
the character casing is implementation dependent. Since XHTML is
based on XML, in XHTML everything is case sensitive, and element
and attribute names must be lowercase in the markup.
DOM Level 2: Glossary
glossary-1
. 2001-01-24. [error]
descendant
The definition:
A descendant node of any node A is any node below A in a tree
model of a document, where "above" means "toward the root."
should read:
A descendant node of any node A is any node below A in a tree
model of a document, where "below" means "away from the root."