This appendix contains the complete Java [Java] bindings for the Level 3 Document Object Model Validation.
The Java files are also available as http://www.w3.org/TR/2002/WD-DOM-Level-3-Val-20021008/java-binding.zip
package org.w3c.dom.validation; public class ExceptionVAL extends RuntimeException { public ExceptionVAL(short code, String message) { super(message); this.code = code; } public short code; // ExceptionVALCode public static final short NO_GRAMMAR_AVAILABLE = 71; public static final short VALIDATION_ERR = 72; }
package org.w3c.dom.validation; public interface DocumentEditVAL extends NodeEditVAL { public boolean getContinuousValidityChecking(); public void setContinuousValidityChecking(boolean continuousValidityChecking); public void validateDocument() throws ExceptionVAL; }
package org.w3c.dom.validation; import org.w3c.dom.Node; public interface NodeEditVAL { // CheckTypeVAL public static final short WF_CHECK = 1; public static final short NS_WF_CHECK = 2; public static final short PARTIAL_VALIDITY_CHECK = 3; public static final short STRICT_VALIDITY_CHECK = 4; public boolean canInsertBefore(Node newChild, Node refChild); public boolean canRemoveChild(Node oldChild); public boolean canReplaceChild(Node newChild, Node oldChild); public boolean canAppendChild(Node newChild); public boolean isNodeValid(boolean deep, short wFValidityCheckLevel) throws ExceptionVAL; }
package org.w3c.dom.validation; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Attr; public interface ElementEditVAL extends NodeEditVAL { public NodeList getDefinedElementTypes(); public short contentType(); public boolean canSetAttribute(String attrname, String attrval); public boolean canSetAttributeNode(Attr attrNode); public boolean canSetAttributeNS(String namespaceURI, String qualifiedName, String value); public boolean canRemoveAttribute(String attrname); public boolean canRemoveAttributeNS(String namespaceURI, String localName); public boolean canRemoveAttributeNode(Node attrNode); public NodeList getChildElements(); public NodeList getParentElements(); public NodeList getAttributeList(); public boolean isElementDefined(String name); public boolean isElementDefinedNS(String name, String namespaceURI); }
package org.w3c.dom.validation; public interface CharacterDataEditVAL extends NodeEditVAL { public boolean getIsWhitespaceOnly(); public boolean canSetData(int offset, String arg); public boolean canAppendData(String arg); public boolean canReplaceData(int offset, int count, String arg); public boolean canInsertData(int offset, String arg); public boolean canDeleteData(int offset, int count); }