Errata of the Document Object Model Level 2 Specifications (original) (raw)
This document lists the known errata to the Document Object Model Level 2 specifications. Each entry has the following information:
Please send general comments about this document to the public mailing list www-dom@w3.org. An archive is available at http://lists.w3.org/Archives/Public/www-dom/.
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 forDocument.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 forElement.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. obsoletecore-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. obsoletecore-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 forElement.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 forElement.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 forNamedNodeMap.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.