Package org.w3c.dom.validation
Interface DocumentEditVAL
- All Superinterfaces:
NodeEditVAL
- All Known Implementing Classes:
DocumentImpl
This interface extends the
NodeEditVAL interface with
additional methods for document editing. An object implementing this
interface must also implement the Document interface.
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 TypeMethodDescriptionbooleanAn attribute specifying whether the validity of the document is continuously enforced.getDefinedElements(String namespaceURI) Returns list of all element information item names of global declaration, belonging to the specified namespace.voidsetContinuousValidityChecking(boolean continuousValidityChecking) An attribute specifying whether the validity of the document is continuously enforced.shortValidates the document against the schema, e.g., a DTD or an W3C XML schema or another.Methods inherited from interface org.w3c.dom.validation.NodeEditVAL
canAppendChild, canInsertBefore, canInsertBefore, canRemoveChild, canReplaceChild, getDefaultValue, getEnumeratedValues, nodeValidity
-
Method Details
-
getContinuousValidityChecking
boolean getContinuousValidityChecking()An attribute specifying whether the validity of the document is continuously enforced. When the attribute is set totrue, the implementation may raise certain exceptions, depending on the situation (see the following). This attribute isfalseby default.- Throws:
DOMException- NOT_SUPPORTED_ERR: Raised if the implementation does not support setting this attribute totrue.
VALIDATION_ERR: Raised if an operation makes this document not compliant with theVAL_INCOMPLETEvalidity type or the document is invalid, and this attribute is set totrue.ExceptionVAL- NO_SCHEMA_AVAILABLE_ERR: Raised if this attribute is set totrueand a schema is unavailable.
-
setContinuousValidityChecking
void setContinuousValidityChecking(boolean continuousValidityChecking) throws DOMException, ExceptionVAL An attribute specifying whether the validity of the document is continuously enforced. When the attribute is set totrue, the implementation may raise certain exceptions, depending on the situation (see the following). This attribute isfalseby default.- Throws:
DOMException- NOT_SUPPORTED_ERR: Raised if the implementation does not support setting this attribute totrue.
VALIDATION_ERR: Raised if an operation makes this document not compliant with theVAL_INCOMPLETEvalidity type or the document is invalid, and this attribute is set totrue.ExceptionVAL- NO_SCHEMA_AVAILABLE_ERR: Raised if this attribute is set totrueand a schema is unavailable.
-
getDefinedElements
Returns list of all element information item names of global declaration, belonging to the specified namespace.- Parameters:
namespaceURI-namespaceURIof namespace. For DTDs, this isnull.- Returns:
- List of all element information item names belonging to the
specified namespace or
nullif no schema is available.
-
validateDocument
short validateDocument()Validates the document against the schema, e.g., a DTD or an W3C XML schema or another. Any attempt to modify any part of the document while validating results in implementation-dependent behavior. In addition, the validation operation itself cannot modify the document, e.g., for default attributes. This method makes use of the error handler, as described in the [DOM Level 3 Core]DOMConfigurationinterface, with all errors beingSEVERITY_ERRORas defined in theDOMErrorinterface.- Returns:
- A validation state constant.
-