Package | dom.core |
Class | public class EntityReference |
Inheritance | EntityReference Node Object |
Introduced in: | DOM 1 Core |
Note: Character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference. Moreover, the XML processor may completely expand references to entities while building the Document, instead of providing EntityReference nodes. If it does provide such nodes, then for an EntityReference node that represents a reference to a known entity an Entity exists, and the subtree of the EntityReference node is a copy of the Entity node subtree. However, the latter may not be true when an entity contains an unbound namespace prefix. In such a case, because the namespace prefix resolution depends on where the entity reference is, the descendants of the EntityReference node may be bound to different namespace URIs. When an EntityReference node represents a reference to an unknown entity, the node has no children and its replacement value, when used by Attr.value for example, is empty.
Note: As for Entity nodes, EntityReference nodes and all their descendants are readonly.
Note: EntityReference nodes may cause element content and attribute value normalization problems when, such as in XML 1.0 and XML Schema, the normalization is performed after entity reference are expanded.
Note (Mozilla): This is not implemented in Mozilla.
See also
Event | Summary | Defined By | ||
---|---|---|---|---|
A node has been added as a child of another node or, in case of Attr nodes, has been added to an Element. | EntityReference | |||
A node has been inserted into a document, either through direct insertion of the node or insertion of a subtree in which it is contained; Attr nodes are considered part of an Element's subtree. | EntityReference | |||
A node is being removed from its parent node or, in case of Attr nodes, removed from its ownerElement. | EntityReference | |||
A node is being removed from a document, either through direct removal of the node or removal of a subtree in which it is contained; Attr nodes are considered part of an Element's subtree. | EntityReference |
DOMNodeInserted | Event |
dom.events.MutationEvent
DOMNodeInserted
A node has been added as a child of another node or, in case of Attr nodes, has been added to an Element. This event is dispatched after the insertion has taken place. The target node of this event is the node being inserted.
DOMNodeInsertedIntoDocument | Event |
dom.events.MutationEvent
DOMNodeInsertedIntoDocument
A node has been inserted into a document, either through direct insertion of the node or insertion of a subtree in which it is contained; Attr nodes are considered part of an Element's subtree. This event is dispatched after the insertion has taken place. The target node of this event is the node being inserted. If the node is being directly inserted, the event type DOMNodeInserted occurs before this event type.
DOMNodeRemoved | Event |
dom.events.MutationEvent
DOMNodeRemoved
A node is being removed from its parent node or, in case of Attr nodes, removed from its ownerElement. This event is dispatched before the removal takes place. The target node of this event is the node being removed.
DOMNodeRemovedFromDocument | Event |
dom.events.MutationEvent
DOMNodeRemovedFromDocument
A node is being removed from a document, either through direct removal of the node or removal of a subtree in which it is contained; Attr nodes are considered part of an Element's subtree. This event is dispatched before the removal takes place. The target node of this event type is the node being removed. If the node is being directly removed, the event type DOMNodeRemoved occurs before this event type.