This appendix contains the complete OMG IDL [OMG IDL] for the Level 3 Document Object Model Validation definitions.
The IDL files are also available as: http://www.w3.org/TR/2002/WD-DOM-Level-3-Val-20021008/idl.zip
// File: validation.idl
#ifndef _VALIDATION_IDL_
#define _VALIDATION_IDL_
#include "dom.idl"
#pragma prefix "dom.w3c.org"
module validation
{
typedef dom::Node Node;
typedef dom::NodeList NodeList;
typedef dom::DOMString DOMString;
typedef dom::Attr Attr;
exception ExceptionVAL {
unsigned short code;
};
// ExceptionVALCode
const unsigned short NO_GRAMMAR_AVAILABLE = 71;
const unsigned short VALIDATION_ERR = 72;
interface NodeEditVAL {
// CheckTypeVAL
const unsigned short WF_CHECK = 1;
const unsigned short NS_WF_CHECK = 2;
const unsigned short PARTIAL_VALIDITY_CHECK = 3;
const unsigned short STRICT_VALIDITY_CHECK = 4;
boolean canInsertBefore(in Node newChild,
in Node refChild);
boolean canRemoveChild(in Node oldChild);
boolean canReplaceChild(in Node newChild,
in Node oldChild);
boolean canAppendChild(in Node newChild);
boolean isNodeValid(in boolean deep,
in unsigned short wFValidityCheckLevel)
raises(ExceptionVAL);
};
interface ElementEditVAL : NodeEditVAL {
readonly attribute NodeList definedElementTypes;
unsigned short contentType();
boolean canSetAttribute(in DOMString attrname,
in DOMString attrval);
boolean canSetAttributeNode(in Attr attrNode);
boolean canSetAttributeNS(in DOMString namespaceURI,
in DOMString qualifiedName,
in DOMString value);
boolean canRemoveAttribute(in DOMString attrname);
boolean canRemoveAttributeNS(in DOMString namespaceURI,
in DOMString localName);
boolean canRemoveAttributeNode(in Node attrNode);
NodeList getChildElements();
NodeList getParentElements();
NodeList getAttributeList();
boolean isElementDefined(in DOMString name);
boolean isElementDefinedNS(in DOMString name,
in DOMString namespaceURI);
};
interface CharacterDataEditVAL : NodeEditVAL {
readonly attribute boolean isWhitespaceOnly;
boolean canSetData(in unsigned long offset,
in DOMString arg);
boolean canAppendData(in DOMString arg);
boolean canReplaceData(in unsigned long offset,
in unsigned long count,
in DOMString arg);
boolean canInsertData(in unsigned long offset,
in DOMString arg);
boolean canDeleteData(in unsigned long offset,
in unsigned long count);
};
interface DocumentEditVAL : NodeEditVAL {
attribute boolean continuousValidityChecking;
void validateDocument()
raises(ExceptionVAL);
};
};
#endif // _VALIDATION_IDL_