07 April 2004
This section summarizes the changes between [DOM Level 2 Core ] and this new version of the Core specification.
The following new sections have been added:
DOMConfiguration;
Attr Attr interface has two new attributes,
Attr.schemaTypeInfo, and
Attr.isId.Document 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.
DOMException DOMException has two new exception codes:
VALIDATION_ERR and
TYPE_MISMATCH_ERR.
DOMImplementation DOMImplementation interface has one new
method, DOMImplementation.getFeature(feature,
version).Entity Entity interface has three new
attributes: Entity.inputEncoding,
Entity.xmlEncoding, and
Entity.xmlVersion.
Element 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).
Node 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.
Text Text interface has two new attributes,
Text.wholeText and
Text.isElementContentWhitespace, and one new
method, Text.replaceWholeText(content).
Document.xmlVersion.
DOMUserData DOMUserData type was added to the Core
module.DOMObject DOMObject type was added to the Core
module.DOMStringList DOMStringList interface has one
attribute, DOMStringList.length, and one
method, DOMStringList.item(index).
NameList NameList interface has one attribute,
NameList.length, and two methods,
NameList.getName(index) and
NameList.getNamespaceURI(index).
DOMImplementationList DOMImplementationList interface has one
attribute, DOMImplementationList.length, and
one method,
DOMImplementationList.item(index).
DOMImplementationSource DOMImplementationSource interface has two
methods,
DOMImplementationSource.getDOMImplementation(features),
and
DOMImplementationSource.getDOMImplementationList(features).
TypeInfo TypeInfo interface has two attributes,
TypeInfo.typeName, and
TypeInfo.typeNamespace.
UserDataHandler 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 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 DOMErrorHandler interface has one method:
DOMErrorHandler.handleError(error).
DOMLocator DOMLocator interface has seven attributes:
DOMLocator.lineNumber,
DOMLocator.columnNumber,
DOMLocator.byteOffset,
DOMLocator.utf16Offset,
DOMLocator.relatedNode,
DOMLocator.uri, and
DOMLocator.lineNumber.
DOMConfiguration DOMConfiguration interface has one attribute:
DOMConfiguration.parameterNames.
It also has three methods:
DOMConfiguration.setParameter(name, value),
DOMConfiguration.getParameter(name), and
DOMConfiguration.canSetParameter(name,
value).
This specification defines one object, only provided in the bindings:
DOMImplementationRegistryDOMImplementationRegistry object has two methods,
DOMImplementationRegistry.getDOMImplementation(features),
and
DOMImplementationRegistry.getDOMImplementationList(features).