Package org.w3c.dom.validation
Interface CharacterDataEditVAL
- All Superinterfaces:
NodeEditVAL
- All Known Implementing Classes:
CDATASectionImpl,CharacterDataImpl,CommentImpl,TextImpl
This interface extends the
NodeEditVAL interface with
additional methods for document editing. An object implementing this
interface must also implement CharacterData interface. When
validating CharacterData nodes, the NodeEditVAL.nodeValidity
operation must find the nearest parent node in order to do this; if no
parent node is found, VAL_UNKNOWN is returned. In addition, when
VAL_INCOMPLETE is passed in as an argument to the
NodeEditVAL.nodeValidity operation to operate on such
nodes, the operation considers all the text and not just some of it.
See also the Document Object Model (DOM) Level 3 Validation Specification.
-
Field Summary
Fields inherited from interface org.w3c.dom.validation.NodeEditVAL
VAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF -
Method Summary
Modifier and TypeMethodDescriptionshortcanAppendData(String arg) Determines if character data can be appended.shortcanDeleteData(int offset, int count) Determines if character data can be deleted.shortcanInsertData(int offset, String arg) Determines if character data can be inserted.shortcanReplaceData(int offset, int count, String arg) Determines if character data can be replaced.shortcanSetData(String arg) Determines if character data can be set.shortDetermines if character data is only whitespace.Methods inherited from interface org.w3c.dom.validation.NodeEditVAL
canAppendChild, canInsertBefore, canInsertBefore, canRemoveChild, canReplaceChild, getDefaultValue, getEnumeratedValues, nodeValidity
-
Method Details
-
isWhitespaceOnly
short isWhitespaceOnly()Determines if character data is only whitespace.- Returns:
- A validation state constant.
-
canSetData
Determines if character data can be set.- Parameters:
arg- Argument to be set.- Returns:
- A validation state constant.
-
canAppendData
Determines if character data can be appended.- Parameters:
arg- Data to be appended.- Returns:
- A validation state constant.
-
canReplaceData
Determines if character data can be replaced.- Parameters:
offset- Offset.count- Replacement.arg- Argument to be set.- Returns:
- A validation state constant.
- Throws:
DOMException- INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
-
canInsertData
Determines if character data can be inserted.- Parameters:
offset- Offset.arg- Argument to be set.- Returns:
- A validation state constant.
- Throws:
DOMException- INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data.
-
canDeleteData
Determines if character data can be deleted.- Parameters:
offset- Offset.count- Number of 16-bit units to delete.- Returns:
- A validation state constant.
- Throws:
DOMException- INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
-