Top Fields Methods
org.apache.xerces.dom3.as

public Interface NodeEditAS

Known Direct Subinterfaces
org.apache.xerces.dom3.as.CharacterDataEditAS, org.apache.xerces.dom3.as.DocumentEditAS, org.apache.xerces.dom3.as.ElementEditAS
Imports
org.w3c.dom.Node

Deprecated

This interface extends a Node from with additional methods for guided document editing. The expectation is that an instance of the DOMImplementationAS interface can be obtained by using binding-specific casting methods on an instance of the DOMImplementation interface when the DOM implementation supports the feature "AS-DOC".

See also the Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.

Field Summary

Modifier and TypeField and Description
public static final short
NS_WF_CHECK

Check for namespace well-formedness includes WF_CHECK.

public static final short
PARTIAL_VALIDITY_CHECK

Checks for whether this node is partially valid.

public static final short
STRICT_VALIDITY_CHECK

Checks for strict validity of the node with respect to active AS which by definition includes NS_WF_CHECK.

public static final short
WF_CHECK

Check for well-formedness of this node.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if no reason it can't be done; false if it can't be done.
canAppendChild
(Node
Node to be appended.
newChild
)

Has the same arguments as AppendChild.

public boolean

Returns:

true if no reason it can't be done; false if it can't be done.
canInsertBefore
(Node
Node to be inserted.
newChild
,
Node
Reference Node.
refChild
)

Determines whether the insertBefore operation from the Node interface would make this document invalid with respect to the currently active AS.

public boolean

Returns:

true if no reason it can't be done; false if it can't be done.
canRemoveChild
(Node
Node to be removed.
oldChild
)

Has the same arguments as RemoveChild.

public boolean

Returns:

true if no reason it can't be done; false if it can't be done.
canReplaceChild
(Node
New Node.
newChild
,
Node
Node to be replaced.
oldChild
)

Has the same arguments as ReplaceChild.

public boolean

Returns:

true if the node is valid/well-formed in the current context and check level defined by wfValidityCheckLevel, false if not.
isNodeValid
(boolean
Setting the deep flag on causes the isNodeValid method to check for the whole subtree of the current node for validity. Setting it to false only checks the current node and its immediate child nodes. The validate method on the DocumentAS interface, however, checks to determine whether the entire document is valid.
deep
,
short
Flag to tell at what level validity and well-formedness checking is done.
wFValidityCheckLevel
)

Determines if the Node is valid relative to currently active AS.

Field Detail

NS_WF_CHECKback to summary
public static final short NS_WF_CHECK

Check for namespace well-formedness includes WF_CHECK.

PARTIAL_VALIDITY_CHECKback to summary
public static final short PARTIAL_VALIDITY_CHECK

Checks for whether this node is partially valid. It includes NS_WF_CHECK.

STRICT_VALIDITY_CHECKback to summary
public static final short STRICT_VALIDITY_CHECK

Checks for strict validity of the node with respect to active AS which by definition includes NS_WF_CHECK.

WF_CHECKback to summary
public static final short WF_CHECK

Check for well-formedness of this node.

Method Detail

canAppendChildback to summary
public boolean canAppendChild(Node newChild)

Has the same arguments as AppendChild.

Parameters
newChild:Node

Node to be appended.

Returns:boolean

true if no reason it can't be done; false if it can't be done.

canInsertBeforeback to summary
public boolean canInsertBefore(Node newChild, Node refChild)

Determines whether the insertBefore operation from the Node interface would make this document invalid with respect to the currently active AS. Describe "valid" when referring to partially completed documents.

Parameters
newChild:Node

Node to be inserted.

refChild:Node

Reference Node.

Returns:boolean

true if no reason it can't be done; false if it can't be done.

canRemoveChildback to summary
public boolean canRemoveChild(Node oldChild)

Has the same arguments as RemoveChild.

Parameters
oldChild:Node

Node to be removed.

Returns:boolean

true if no reason it can't be done; false if it can't be done.

canReplaceChildback to summary
public boolean canReplaceChild(Node newChild, Node oldChild)

Has the same arguments as ReplaceChild.

Parameters
newChild:Node

New Node.

oldChild:Node

Node to be replaced.

Returns:boolean

true if no reason it can't be done; false if it can't be done.

isNodeValidback to summary
public boolean isNodeValid(boolean deep, short wFValidityCheckLevel) throws DOMASException

Determines if the Node is valid relative to currently active AS. It doesn't normalize before checking if the document is valid. To do so, one would need to explicitly call a normalize method.

Parameters
deep:boolean

Setting the deep flag on causes the isNodeValid method to check for the whole subtree of the current node for validity. Setting it to false only checks the current node and its immediate child nodes. The validate method on the DocumentAS interface, however, checks to determine whether the entire document is valid.

wFValidityCheckLevel:short

Flag to tell at what level validity and well-formedness checking is done.

Returns:boolean

true if the node is valid/well-formed in the current context and check level defined by wfValidityCheckLevel, false if not.

Exceptions
DOMASException:
NO_AS_AVAILABLE: Raised if the DocumentEditAS related to this node does not have any active ASModel and wfValidityCheckLevel is set to PARTIAL or STRICT_VALIDITY_CHECK .