This interface extends the Entity interface
with additional attributes to provide information on the text
declaration of external parsed entities.
interface Entity3 : Entity {
attribute DOMString actualEncoding;
attribute DOMString encoding;
attribute DOMString version;
};
actualEncoding of type DOMStringnull
otherwise.
encoding of type DOMStringnull otherwise.
version of type DOMStringnull otherwise.
This interface extends the Document interface
with additional attributes and methods.
interface Document3 : Document {
attribute DOMString actualEncoding;
attribute DOMString encoding;
attribute boolean standalone;
attribute boolean strictErrorChecking;
attribute DOMString version;
Node adoptNode(in Node source)
raises(DOMException);
NodeList getElementsByAttributeValue(in DOMString namespaceURI,
in DOMString localName,
in DOMString value);
};
actualEncoding of type DOMStringnull otherwise.
encoding of type DOMStringnull when
unspecified.
standalone of type boolean
strictErrorChecking of type booleanfalse, the implementation is free
to not test every possible error case normally defined on DOM
operations, and not raise any DOMException. In case
of error, the behavior is undefined. This attribute is
true by defaults.
version of type DOMStringnull when
unspecified.
adoptNodeownerDocument of a node, its
children, as well as the attached attribute nodes if there are
any. If the node has a parent it is first removed from its parent
child list. This effectively allows moving a subtree from one
document to another. The following list describes the specifics
for each type of node.
ownerElement attribute is set to
null and the specified flag is set to
true on the adopted Attr. The
descendants of the source Attr are recursively
adopted.Document nodes cannot be adopted.DocumentType nodes cannot be adopted.Attr nodes.
Default attributes are discarded, though if the document
being adopted into defines default attributes for this element
name, those are assigned. The descendants of the source element
are recursively adopted.Entity nodes can be adopted, however in the
current release of the DOM the DocumentType is
readonly. Ability to add these adopted nodes to a
DocumentType will be considered for addition to a
future release of the DOM. The descendants of the the source
entity are recursively adopted.EntityReference node itself is
adopted, the descendants are discarded, since the
source and destination documents might have defined the entity
differently. If the document being imported into provides a
definition for this entity name, its value is assigned.Notation nodes can be adopted, however in the
current release of the DOM the DocumentType is
readonly. Ability to add these adopted nodes to a
DocumentType will be considered for addition to a
future release of the DOM.source of type
Node
|
The adopted node, or |
|
NOT_SUPPORTED_ERR: Raised if the source node is of type
NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is readonly. |
getElementsByAttributeValuenamespaceURI of type
DOMStringlocalName of type
DOMStringvalue of type
DOMString
|
Returns a list containing the elements that have an attribute that matches the given namespace URI, local name, and value. |
This interface extends the Node interface with
several new methods. One allows to compare a node against another
with regard to document order. Another methode allows to retrieve
the content of a node and its descendants as a single
DOMString. One allows to test whether two nodes are the same. Two
methods provide for searching the namespace URI associated to a
given prefix and to ensure the document is "namespace
wellformed". Finally, a method allows to attach some user data to a
Node. It also provides a new attribute to get the base URI of a
node, as defined in the XML Infoset.
interface Node3 {
readonly attribute DOMString baseURI;
typedef enum _DocumentOrder {
PRECEDING,
FOLLOWING,
SAME,
UNORDERED
};
DocumentOrder;
DocumentOrder compareDocumentOrder(in Node other)
raises(DOMException);
typedef enum _TreePosition {
PRECEDING,
FOLLOWING,
ANCESTOR,
DESCENDANT,
SAME,
UNORDERED
};
TreePosition;
TreePosition compareTreePosition(in Node other)
raises(DOMException);
attribute DOMString textContent;
boolean isSameNode(in Node other);
DOMString lookupNamespacePrefix(in DOMString namespaceURI);
DOMString lookupNamespaceURI(in DOMString prefix);
void normalizeNS();
Object setUserData(in Object data,
in DOMString key);
Object getUserData(in DOMString key);
readonly attribute Object key;
};
A type to hold the document order of a node relative to another node.
An enumeration of the different orders the node can be
in.
| Enumerator Values |
| PRECEDING | The node preceds the reference node in document order. |
| FOLLOWING | The node follows the reference node in document order. |
| SAME | The two nodes have the same document order. |
| UNORDERED | The two nodes are unordered, they do not have any common ancestor. |
A type to hold the relative tree position of a node with respect to another node.
An enumeration of the different orders the node can be
in.
| Enumerator Values |
| PRECEDING | The node preceds the reference node. |
| FOLLOWING | The node follows the reference node. |
| ANCESTOR | The node is an ancestor of the reference node. |
| DESCENDANT | The node is a descendant of the reference node. |
| SAME | The two nodes have the same position. |
| UNORDERED | The two nodes are unordered, they do not have any common ancestor. |
baseURI of type DOMString, readonly
key of type Object, readonly
textContent of type DOMStringText node
containing the string this attribute is set to. On getting, no
serialization is performed, the returned string does not contain
any markup. Similarly, on setting, no parsing is performed
either, the input string is taken as pure textual content.| Node type | Content |
|---|---|
| ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE |
concatenation of the textContent of the
child nodes, excluding COMMENT_NODE and
PROCESSING_INSTRUCTION_NODE nodes |
| ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE |
nodeValue |
| DOCUMENT_TYPE_NODE, NOTATION_NODE | empty string |
compareDocumentOrderother of type
Node|
Returns how the given node compares with this node in document order. |
|
WRONG_DOCUMENT_ERR: Raised if the given node does not belong to the same document as this node. |
compareTreePositionother of type
Node|
Returns how the given node is positioned relatively to this node. |
|
WRONG_DOCUMENT_ERR: Raised if the given node does not belong to the same document as this node. |
getUserDatasetUserData.key of type
DOMString
|
The object associated to this node and the given key or
|
isSameNodeother of type
Node
|
Returns |
lookupNamespacePrefixnamespaceURI of type
DOMString
|
Returns the associated namespace prefix or |
lookupNamespaceURIprefix of type
DOMString
|
Returns the associated namespace URI or |
normalizeNS
setUserDatagetUserData.data of type
Objectkey of type
DOMString
|
The object previously associated to this node and the
given key or |
This interface extends the Text interface with
a new attribute that allows one to find out whether a
Text node only contains whitespace in element
content.
interface Text3 : Text {
readonly attribute boolean isWhitespaceInElementContent;
};
isWhitespaceInElementContent of type boolean, readonlyNote: An implementation can only return true if, one
way or another, it has access to the relevant information
(e.g., the DTD or schema).