07 April 2004

Appendix A: Changes

Editor:
Philippe Le Hégaret, W3C

Table of contents

This section summarizes the changes between [DOM Level 2 Core] and this new version of the Core specification.

A.1 New sections

The following new sections have been added:

A.2 Changes to DOM Level 2 Core interfaces and exceptions

Interface Attr
The Attr interface has two new attributes, Attr.schemaTypeInfo, and Attr.isId.
Interface Document
The Document interface has seven new attributes: Document.inputEncoding, Document.xmlEncoding, Document.xmlStandalone, Document.xmlVersion, Document.strictErrorChecking, Document.documentURI, and Document.domConfig. It has three new methods: Document.adoptNode(source), Document.normalizeDocument(), and Document.renameNode(n, namespaceURI, qualifiedName). The attribute Document.doctype has been modified.
Exception DOMException
The DOMException has two new exception codes: VALIDATION_ERR and TYPE_MISMATCH_ERR.
Interface DOMImplementation
The DOMImplementation interface has one new method, DOMImplementation.getFeature(feature, version).
Interface Entity
The Entity interface has three new attributes: Entity.inputEncoding, Entity.xmlEncoding, and Entity.xmlVersion.
Interface Element
The Element interface has one new attribute, Element.schemaTypeInfo, and three new methods: Element.setIdAttribute(name, isId), Element.setIdAttributeNS(namespaceURI, localName, isId), and Element.setIdAttributeNode(idAttr, isId).
Interface Node
The Node interface has two new attributes, Node.baseURI and Node.textContent. It has nine new methods: Node.compareDocumentPosition(other), Node.isSameNode(other), Node.lookupPrefix(namespaceURI), Node.isDefaultNamespace(namespaceURI), Node.lookupNamespaceURI(prefix), Node.isEqualNode(arg), Node.getFeature(feature, version), Node.setUserData(key, data, handler), Node.getUserData(key). It introduced 6 new constants: Node.DOCUMENT_POSITION_DISCONNECTED, Node.DOCUMENT_POSITION_PRECEDING, Node.DOCUMENT_POSITION_FOLLOWING, Node.DOCUMENT_POSITION_CONTAINS, Node.DOCUMENT_POSITION_CONTAINED_BY, and Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC. The methods Node.insertBefore(newChild, refChild), Node.replaceChild(newChild, oldChild) and Node.removeChild(oldChild) have been modified.
Interface Text
The Text interface has two new attributes, Text.wholeText and Text.isElementContentWhitespace, and one new method, Text.replaceWholeText(content).

A.3 New DOM features

"XMLVersion"
The "XMLVersion" DOM feature was introduced to represent if an implementation is able to support [XML 1.0] or [XML 1.1]. See Document.xmlVersion.

A.4 New types

DOMUserData
The DOMUserData type was added to the Core module.
DOMObject
The DOMObject type was added to the Core module.

A.5 New interfaces

DOMStringList
The DOMStringList interface has one attribute, DOMStringList.length, and one method, DOMStringList.item(index).
NameList
The NameList interface has one attribute, NameList.length, and two methods, NameList.getName(index) and NameList.getNamespaceURI(index).
DOMImplementationList
The DOMImplementationList interface has one attribute, DOMImplementationList.length, and one method, DOMImplementationList.item(index).
DOMImplementationSource
The DOMImplementationSource interface has two methods, DOMImplementationSource.getDOMImplementation(features), and DOMImplementationSource.getDOMImplementationList(features).
TypeInfo
The TypeInfo interface has two attributes, TypeInfo.typeName, and TypeInfo.typeNamespace.
UserDataHandler
The UserDataHandler interface has one method, UserDataHandler.handle(operation, key, data, src, dst), and four constants: UserDataHandler.NODE_CLONED, UserDataHandler.NODE_IMPORTED, UserDataHandler.NODE_DELETED, and UserDataHandler.NODE_RENAMED.
DOMError
The DOMError interface has six attributes: DOMError.severity, DOMError.message, DOMError.type, DOMError.relatedException, DOMError.relatedData, and DOMError.location. It has four constants: DOMError.SEVERITY_WARNING, DOMError.SEVERITY_ERROR, and DOMError.SEVERITY_FATAL_ERROR.
DOMErrorHandler
The DOMErrorHandler interface has one method: DOMErrorHandler.handleError(error).
DOMLocator
The DOMLocator interface has seven attributes: DOMLocator.lineNumber, DOMLocator.columnNumber, DOMLocator.byteOffset, DOMLocator.utf16Offset, DOMLocator.relatedNode, DOMLocator.uri, and DOMLocator.lineNumber.
DOMConfiguration
The DOMConfiguration interface has one attribute: DOMConfiguration.parameterNames. It also has three methods: DOMConfiguration.setParameter(name, value), DOMConfiguration.getParameter(name), and DOMConfiguration.canSetParameter(name, value).

A.6 Objects

This specification defines one object, only provided in the bindings:

DOMImplementationRegistry
The DOMImplementationRegistry object has two methods, DOMImplementationRegistry.getDOMImplementation(features), and DOMImplementationRegistry.getDOMImplementationList(features).