09 February 2001

Appendix C: ECMA Script Language Binding

This appendix contains the complete ECMA Script [ECMAScript] binding for the Level 3 Document Object Model Content Model and Load and Save definitions.

Object CMModel
CMModel has the all the properties and methods of the CMNode object as well as the properties and methods defined below.
The CMModel object has the following properties:
isNamespaceAware
This read-only property is of type Boolean.
rootElementDecl
This read-only property is a ElementDeclaration object.
The CMModel object has the following methods:
getLocation()
This method returns a String.
getCMNamespace()
This method returns a nsElement object.
getCMNodes()
This method returns a CMNamedNodeMap object.
removeNode(node)
This method returns a Boolean.
The node parameter is a CMNode object.
insertBefore(newNode, refNode)
This method returns a Boolean.
The newNode parameter is a CMNode object.
The refNode parameter is a CMNode object.
validate()
This method returns a Boolean.
Object CMExternalModel
CMExternalModel has the all the properties and methods of the CMModel object as well as the properties and methods defined below.
Prototype Object CMNode
The CMNode class has the following constants:
CMNode.ELEMENT_DECLARATION
This constant is of type Number and its value is 1.
CMNode.ATTRIBUTE_DECLARATION
This constant is of type Number and its value is 2.
CMNode.CM_NOTATION_DECLARATION
This constant is of type Number and its value is 3.
CMNode.ENTITY_DECLARATION
This constant is of type Number and its value is 4.
CMNode.CM_CHILDREN
This constant is of type Number and its value is 5.
CMNode.CM_MODEL
This constant is of type Number and its value is 6.
CMNode.CM_EXTERNALMODEL
This constant is of type Number and its value is 7.
Object CMNode
The CMNode object has the following properties:
cmNodeType
This read-only property is of type Number.
The CMNode object has the following methods:
cloneCM()
This method returns a CMNode object.
cloneExternalCM()
This method returns a CMNode object.
Object CMNodeList
Object CMNamedNodeMap
Prototype Object CMDataType
The CMDataType class has the following constants:
CMDataType.STRING_DATATYPE
This constant is of type short and its value is 1.
CMDataType.BOOLEAN_DATATYPE
This constant is of type short and its value is 2.
CMDataType.FLOAT_DATATYPE
This constant is of type short and its value is 3.
CMDataType.DOUBLE_DATATYPE
This constant is of type short and its value is 4.
CMDataType.LONG_DATATYPE
This constant is of type short and its value is 5.
CMDataType.INT_DATATYPE
This constant is of type short and its value is 6.
CMDataType.SHORT_DATATYPE
This constant is of type short and its value is 7.
CMDataType.BYTE_DATATYPE
This constant is of type short and its value is 8.
Object CMDataType
The CMDataType object has the following properties:
lowValue
This property is a int object.
highValue
This property is a int object.
The CMDataType object has the following methods:
getPrimitiveType()
This method returns a short object.
Object ElementDeclaration
The ElementDeclaration object has the following methods:
getContentType()
This method returns a int object.
getCMChildren()
This method returns a CMChildren object.
getCMAttributes()
This method returns a CMNamedNodeMap object.
getCMGrandChildren()
This method returns a CMNamedNodeMap object.
Object CMChildren
The CMChildren object has the following properties:
listOperator
This property is of type String.
elementType
This property is a CMDataType object.
multiplicity
This property is a int object.
subModels
This property is a CMNamedNodeMap object.
isPCDataOnly
This read-only property is of type Boolean.
Prototype Object AttributeDeclaration
The AttributeDeclaration class has the following constants:
AttributeDeclaration.NO_VALUE_CONSTRAINT
This constant is of type short and its value is 0.
AttributeDeclaration.DEFAULT_VALUE_CONSTRAINT
This constant is of type short and its value is 1.
AttributeDeclaration.FIXED_VALUE_CONSTRAINT
This constant is of type short and its value is 2.
Object AttributeDeclaration
The AttributeDeclaration object has the following properties:
attrName
This read-only property is of type String.
attrType
This property is a CMDataType object.
attributeValue
This property is of type String.
enumAttr
This property is of type String.
ownerElement
This property is a CMNodeList object.
constraintType
This property is a short object.
Object EntityDeclaration
Object CMNotationDeclaration
The CMNotationDeclaration object has the following properties:
strSystemIdentifier
This property is of type String.
strPublicIdentifier
This property is of type String.
Object Document
The Document object has the following methods:
setErrorHandler(handler)
This method has no return value.
The handler parameter is a DOMErrorHandler object.
Object DocumentCM
DocumentCM has the all the properties and methods of the Document object as well as the properties and methods defined below.
The DocumentCM object has the following methods:
numCMs()
This method returns a int object.
getInternalCM()
This method returns a CMModel object.
getCMs()
This method returns a CMExternalModel * object.
getActiveCM()
This method returns a CMModel object.
addCM(cm)
This method has no return value.
The cm parameter is a CMModel object.
removeCM(cm)
This method has no return value.
The cm parameter is a CMModel object.
activateCM(cm)
This method returns a Boolean.
The cm parameter is a CMModel object.
Object DOMImplementationCM
DOMImplementationCM has the all the properties and methods of the DOMImplementation object as well as the properties and methods defined below.
The DOMImplementationCM object has the following methods:
createCM()
This method returns a CMModel object.
createExternalCM()
This method returns a CMExternalModel object.
Object NodeCM
NodeCM has the all the properties and methods of the Node object as well as the properties and methods defined below.
The NodeCM object has the following methods:
canInsertBefore(newChild, refChild)
This method returns a Boolean.
The newChild parameter is a Node object.
The refChild parameter is a Node object.
This method can raise a DOMException object.
canRemoveChild(oldChild)
This method returns a Boolean.
The oldChild parameter is a Node object.
This method can raise a DOMException object.
canReplaceChild(newChild, oldChild)
This method returns a Boolean.
The newChild parameter is a Node object.
The oldChild parameter is a Node object.
This method can raise a DOMException object.
canAppendChild(newChild)
This method returns a Boolean.
The newChild parameter is a Node object.
This method can raise a DOMException object.
isValid()
This method returns a Boolean.
Object ElementCM
ElementCM has the all the properties and methods of the Element object as well as the properties and methods defined below.
The ElementCM object has the following methods:
contentType()
This method returns a int object.
getElementDeclaration()
This method returns a ElementDeclaration object.
This method can raise a DOMException object.
canSetAttribute(attrname, attrval)
This method returns a Boolean.
The attrname parameter is of type String.
The attrval parameter is of type String.
canSetAttributeNode(node)
This method returns a Boolean.
The node parameter is a Node object.
canSetAttributeNodeNS(node, namespaceURI, localName)
This method returns a Boolean.
The node parameter is a Node object.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
canSetAttributeNS(attrname, attrval, namespaceURI, localName)
This method returns a Boolean.
The attrname parameter is of type String.
The attrval parameter is of type String.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
Object CharacterDataCM
CharacterDataCM has the all the properties and methods of the Text object as well as the properties and methods defined below.
The CharacterDataCM object has the following methods:
isWhitespaceOnly()
This method returns a Boolean.
canSetData(offset, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
canAppendData(arg)
This method returns a Boolean.
The arg parameter is of type String.
This method can raise a DOMException object.
canReplaceData(offset, count, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The count parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
canInsertData(offset, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
canDeleteData(offset, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
Object DocumentTypeCM
DocumentTypeCM has the all the properties and methods of the DocumentType object as well as the properties and methods defined below.
The DocumentTypeCM object has the following methods:
isElementDefined(elemTypeName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
isElementDefinedNS(elemTypeName, namespaceURI, localName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
isAttributeDefined(elemTypeName, attrName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
The attrName parameter is of type String.
isAttributeDefinedNS(elemTypeName, attrName, namespaceURI, localName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
The attrName parameter is of type String.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
isEntityDefined(entName)
This method returns a Boolean.
The entName parameter is of type String.
Object AttributeCM
The AttributeCM object has the following methods:
getAttributeDeclaration()
This method returns a AttributeDeclaration object.
getNotation()
This method returns a CMNotationDeclaration object.
This method can raise a DOMException object.
Object DOMErrorHandler
The DOMErrorHandler object has the following methods:
warning(where, how, why)
This method has no return value.
The where parameter is a DOMLocator object.
The how parameter is of type String.
The why parameter is of type String.
This method can raise a DOMSystemException object.
fatalError(where, how, why)
This method has no return value.
The where parameter is a DOMLocator object.
The how parameter is of type String.
The why parameter is of type String.
This method can raise a DOMSystemException object.
error(where, how, why)
This method has no return value.
The where parameter is a DOMLocator object.
The how parameter is of type String.
The why parameter is of type String.
This method can raise a DOMSystemException object.
Object DOMLocator
The DOMLocator object has the following methods:
getColumnNumber()
This method returns a int object.
getLineNumber()
This method returns a int object.
getPublicID()
This method returns a String.
getSystemID()
This method returns a String.
getNode()
This method returns a Node object.
Object DOMImplementationLS
The DOMImplementationLS object has the following methods:
createDOMBuilder()
This method returns a DOMBuilder object.
createDOMWriter()
This method returns a DOMWriter object.
Object DOMBuilder
The DOMBuilder object has the following properties:
entityResolver
This property is a DOMEntityResolver object.
errorHandler
This property is a DOMErrorHandler object.
filter
This property is a DOMBuilderFilter object.
The DOMBuilder object has the following methods:
setFeature(name, state)
This method has no return value.
The name parameter is of type String.
The state parameter is of type Boolean.
This method can raise a DOMException object.
supportsFeature(name)
This method returns a Boolean.
The name parameter is of type String.
canSetFeature(name, state)
This method returns a Boolean.
The name parameter is of type String.
The state parameter is of type Boolean.
getFeature(name)
This method returns a Boolean.
The name parameter is of type String.
This method can raise a DOMException object.
parseURI(uri)
This method returns a Document object.
The uri parameter is of type String.
This method can raise a DOMException object or a DOMSystemException object.
parseDOMInputSource(is)
This method returns a Document object.
The is parameter is a DOMInputSource object.
This method can raise a DOMException object or a DOMSystemException object.
Object DOMInputSource
The DOMInputSource object has the following properties:
byteStream
This property is a DOMInputStream object.
characterStream
This property is a DOMReader object.
encoding
This property is of type String.
publicId
This property is of type String.
systemId
This property is of type String.
Object DOMEntityResolver
The DOMEntityResolver object has the following methods:
resolveEntity(publicId, systemId )
This method returns a DOMInputSource object.
The publicId parameter is of type String.
The systemId parameter is of type String.
This method can raise a DOMSystemException object.
Object DOMBuilderFilter
The DOMBuilderFilter object has the following methods:
endElement(element)
This method returns a Boolean.
The element parameter is a Element object.
Object DOMWriter
The DOMWriter object has the following properties:
encoding
This property is of type String.
lastEncoding
This read-only property is of type String.
format
This property is of type Number.
newLine
This property is of type String.
The DOMWriter object has the following methods:
writeNode(destination, node)
This method has no return value.
The destination parameter is a DOMOutputStream object.
The node parameter is a Node object.
This method can raise a DOMSystemException object.