Sign in Join
FPDoc Onlineexperiment

TDOMNamedNodeMap.ValidateInsert function

Member of TDOMNamedNodeMapprotectedIn unit Laz2_DOM

Performs actions to determine if an inserted attribute node is valid for its context.

Declaration

pascal
function ValidateInsert(arg: TDOMNode): Integer

Arguments

arg

DOM node examined in the method.

Function result

Numeric value reflecting an error condition, or 0 when valid.

Description

ValidateInsert is an Integer function used to determine if the DOM node in arg is valid for the context where it is used. The return value represents a specific error condition when set to a non-zero value.

For example:

NO_MODIFICATION_ALLOWED_ERR
nfReadOnly is included in the Flags for the owner node.
WRONG_DOCUMENT_ERR
The node in arg has a different owner document than the node which owns the map.
HIERARCHY_REQUEST_ERR
The node in arg has a different node type than the node type for the map.
INUSE_ATTRIBUTE_ERR
The map is for Attribute nodes and the owner Element in arg does not match the owner Element for the map.

ValidateInsert is called from the TDOMNamedNodeMap.SetNamedItem method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.