Package org.w3c.dom.validation
Interface NodeEditVAL
- All Known Subinterfaces:
CharacterDataEditVAL,DocumentEditVAL,ElementEditVAL
- All Known Implementing Classes:
AttrImpl,CDATASectionImpl,CharacterDataImpl,CommentImpl,DocumentFragmentImpl,DocumentImpl,DocumentTypeImpl,ElementImpl,EntityImpl,EntityReferenceImpl,NodeImpl,NotationImpl,ProcessingInstructionImpl,TextImpl
public interface NodeEditVAL
This interface is similar to the
[DOM Level 3 Core]
Node interface, with methods for guided document editing.
See also the Document Object Model (DOM) Level 3 Validation Specification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortFalse if the node is invalid with regards to the operation, or if the operation cannot be done.static final shortCheck if the node's immediate children are those expected by the content model.static final shortCheck if the node is namespace well-formed.static final shortCheck if the node's entire subtree are those expected by the content model.static final shortTrue if the node is valid with regards to the operation, or if the operation can be done.static final shortThe validity of the node is unknown.static final shortCheck if the node is well-formed. -
Method Summary
Modifier and TypeMethodDescriptionshortcanAppendChild(Node newChild) Determines whether theNode.appendChildoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.shortcanInsertBefore(Node newChild) Method overload which omits the last parameter.shortcanInsertBefore(Node newChild, Node refChild) Determines whether theNode.insertBeforeoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.shortcanRemoveChild(Node oldChild) Determines whether theNode.removeChildoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.shortcanReplaceChild(Node newChild, Node oldChild) Determines whether theNode.replaceChildoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.The default value specified in an attribute or an element declaration ornullif unspecified.ADOMStringList, as described in [DOM Level 3 Core], of distinct values for an attribute or an element declaration ornullif unspecified.shortnodeValidity(short valType) Determines if the node is valid relative to the validation type specified invalType.
-
Field Details
-
VAL_WF
static final short VAL_WFCheck if the node is well-formed.- See Also:
-
VAL_NS_WF
static final short VAL_NS_WFCheck if the node is namespace well-formed.- See Also:
-
VAL_INCOMPLETE
static final short VAL_INCOMPLETECheck if the node's immediate children are those expected by the content model. This node's trailing required children could be missing. It includesVAL_NS_WF.- See Also:
-
VAL_SCHEMA
static final short VAL_SCHEMACheck if the node's entire subtree are those expected by the content model. It includesVAL_NS_WF.- See Also:
-
VAL_TRUE
static final short VAL_TRUETrue if the node is valid with regards to the operation, or if the operation can be done.- See Also:
-
VAL_FALSE
static final short VAL_FALSEFalse if the node is invalid with regards to the operation, or if the operation cannot be done.- See Also:
-
VAL_UNKNOWN
static final short VAL_UNKNOWNThe validity of the node is unknown.- See Also:
-
-
Method Details
-
getDefaultValue
String getDefaultValue()The default value specified in an attribute or an element declaration ornullif unspecified. If the schema is a W3C XML schema, this is the canonical lexical representation of the default value. -
getEnumeratedValues
DOMStringList getEnumeratedValues()ADOMStringList, as described in [DOM Level 3 Core], of distinct values for an attribute or an element declaration ornullif unspecified. If the schema is a W3C XML schema, this is a list of strings which are lexical representations corresponding to the values in the [value] property of the enumeration component for the type of the attribute or element. It is recommended that the canonical lexical representations of the values be used. -
canInsertBefore
Determines whether theNode.insertBeforeoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.- Parameters:
newChild-Nodeto be inserted.refChild- ReferenceNode.- Returns:
- A validation state constant.
-
canInsertBefore
Method overload which omits the last parameter. -
canRemoveChild
Determines whether theNode.removeChildoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.- Parameters:
oldChild-Nodeto be removed.- Returns:
- A validation state constant.
-
canReplaceChild
Determines whether theNode.replaceChildoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.- Parameters:
newChild- NewNode.oldChild-Nodeto be replaced.- Returns:
- A validation state constant.
-
canAppendChild
Determines whether theNode.appendChildoperation would make this document not compliant with theVAL_INCOMPLETEvalidity type.- Parameters:
newChild-Nodeto be appended.- Returns:
- A validation state constant.
-
nodeValidity
short nodeValidity(short valType) Determines if the node is valid relative to the validation type specified invalType. This operation doesn't normalize before checking if it is valid. To do so, one would need to explicitly call a normalize method. The difference between this method and the DocumentEditVAL.validateDocument method is that the latter method only checks to determine whether the entire document is valid.- Parameters:
valType- Flag to indicate the validation type checking to be done.- Returns:
- A validation state constant.
-