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 property is a CMElementDeclaration 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.
- createCMElementDeclaration(namespaceURI,
qualifiedElementName, contentSpec)
- This method returns a CMElementDeclaration object.
The namespaceURI parameter is of type String.
The qualifiedElementName parameter is of type
String.
The contentSpec parameter is a int object.
This method can raise a DOMException object.
- createCMAttributeDeclaration(namespaceURI,
qualifiedName)
- This method returns a CMAttributeDeclaration
object.
The namespaceURI parameter is of type String.
The qualifiedName parameter is of type String.
This method can raise a DOMException object.
- createCMNotationDeclaration(name, systemIdentifier,
publicIdentifier)
- This method returns a CMNotationDeclaration
object.
The name parameter is of type String.
The systemIdentifier parameter is of type
String.
The publicIdentifier parameter is of type
String.
This method can raise a DOMException object.
- createCMEntityDeclaration(name)
- This method returns a CMEntityDeclaration object.
The name parameter is of type String.
This method can raise a DOMException object.
- createCMChildren(minOccurs, maxOccurs, operator)
- This method returns a CMChildren object.
The minOccurs parameter is of type Number.
The maxOccurs parameter is of type Number.
The operator parameter is of type Number.
This method can raise a DOMException object.
- 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.CM_ELEMENT_DECLARATION
- This constant is of type Number and its value is
1.
- CMNode.CM_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.CM_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.
- ownerCMModel
- This property is a CMModel object.
- nodeName
- This property is of type String.
- prefix
- This property is of type String.
- localName
- This property is of type String.
- namespaceURI
- This property is of type String.
- The CMNode object has the following methods:
-
- clone()
- 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.
- Object CMDataType
-
- The CMDataType object has the following methods:
-
- getCMPrimitiveType()
- This method returns a short object.
- Prototype Object CMPrimitiveType
-
- The CMPrimitiveType class has the following
constants:
-
- CMPrimitiveType.BOOLEAN_DATATYPE
- This constant is of type short and its value is
2.
- CMPrimitiveType.FLOAT_DATATYPE
- This constant is of type short and its value is
3.
- CMPrimitiveType.DOUBLE_DATATYPE
- This constant is of type short and its value is
4.
- CMPrimitiveType.DECIMAL_DATATYPE
- This constant is of type short and its value is
5.
- CMPrimitiveType.HEXBINARY_DATATYPE
- This constant is of type short and its value is
6.
- CMPrimitiveType.BASE64BINARY_DATATYPE
- This constant is of type short and its value is
7.
- CMPrimitiveType.ANYURI_DATATYPE
- This constant is of type short and its value is
8.
- CMPrimitiveType.QNAME_DATATYPE
- This constant is of type short and its value is
9.
- CMPrimitiveType.DURATION_DATATYPE
- This constant is of type short and its value is
10.
- CMPrimitiveType.DATETIME_DATATYPE
- This constant is of type short and its value is
11.
- CMPrimitiveType.DATE_DATATYPE
- This constant is of type short and its value is
12.
- CMPrimitiveType.TIME_DATATYPE
- This constant is of type short and its value is
13.
- CMPrimitiveType.YEARMONTH_DATATYPE
- This constant is of type short and its value is
14.
- CMPrimitiveType.YEAR_DATATYPE
- This constant is of type short and its value is
15.
- CMPrimitiveType.MONTHDAY_DATATYPE
- This constant is of type short and its value is
16.
- CMPrimitiveType.DAY_DATATYPE
- This constant is of type short and its value is
17.
- CMPrimitiveType.MONTH_DATATYPE
- This constant is of type short and its value is
18.
- CMPrimitiveType.NOTATION_DATATYPE
- This constant is of type short and its value is
19.
- Object CMPrimitiveType
-
- CMPrimitiveType has the all the properties and methods
of the CMDataType object as well as the properties and
methods defined below.
- The CMPrimitiveType object has the following
properties:
-
- lowValue
- This property is a decimal object.
- highValue
- This property is a decimal object.
- Object CMElementDeclaration
-
- CMElementDeclaration has the all the properties and
methods of the CMNode object as well as the properties and
methods defined below.
- The CMElementDeclaration object has the following
properties:
-
- elementType
- This property is a CMDataType object.
- isPCDataOnly
- This read-only property is of type Boolean.
- tagName
- This property is of type String.
- The CMElementDeclaration 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.
- Prototype Object CMChildren
-
- The CMChildren class has the following constants:
-
- CMChildren.UNBOUNDED
- This constant is of type Number and its value is
MAX_LONG.
- CMChildren.NONE
- This constant is of type Number and its value is
0.
- CMChildren.SEQUENCE
- This constant is of type Number and its value is
1.
- CMChildren.CHOICE
- This constant is of type Number and its value is
2.
- Object CMChildren
-
- CMChildren has the all the properties and methods of the
CMNode object as well as the properties and methods defined
below.
- The CMChildren object has the following properties:
-
- listOperator
- This property is of type Number.
- minOccurs
- This property is of type Number.
- maxOccurs
- This property is of type Number.
- subModels
- This property is a CMNodeList object.
- The CMChildren object has the following methods:
-
- removeCMNode(nodeIndex)
- This method returns a CMNode object.
The nodeIndex parameter is of type Number.
- insertCMNode(nodeIndex, newNode)
- This method returns a int object.
The nodeIndex parameter is of type Number.
The newNode parameter is a CMNode object.
- appendCMNode(newNode)
- This method returns a int object.
The newNode parameter is a CMNode object.
- Prototype Object CMAttributeDeclaration
-
- The CMAttributeDeclaration class has the following
constants:
-
- CMAttributeDeclaration.NO_VALUE_CONSTRAINT
- This constant is of type short and its value is
0.
- CMAttributeDeclaration.DEFAULT_VALUE_CONSTRAINT
- This constant is of type short and its value is
1.
- CMAttributeDeclaration.FIXED_VALUE_CONSTRAINT
- This constant is of type short and its value is
2.
- Object CMAttributeDeclaration
-
- CMAttributeDeclaration has the all the properties and
methods of the CMNode object as well as the properties and
methods defined below.
- The CMAttributeDeclaration object has the following
properties:
-
- attrName
- This 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.
- Prototype Object CMEntityDeclaration
-
- The CMEntityDeclaration class has the following
constants:
-
- CMEntityDeclaration.INTERNAL_ENTITY
- This constant is of type short and its value is
1.
- CMEntityDeclaration.EXTERNAL_ENTITY
- This constant is of type short and its value is
2.
- Object CMEntityDeclaration
-
- CMEntityDeclaration has the all the properties and
methods of the CMNode object as well as the properties and
methods defined below.
- The CMEntityDeclaration object has the following
properties:
-
- entityType
- This property is a short object.
- entityName
- This property is of type String.
- entityValue
- This property is of type String.
- systemId
- This property is of type String.
- publicId
- This property is of type String.
- notationName
- This property is of type String.
- Object CMNotationDeclaration
-
- CMNotationDeclaration has the all the properties and
methods of the CMNode object as well as the properties and
methods defined below.
- The CMNotationDeclaration object has the following
properties:
-
- notationName
- This property is of type String.
- systemId
- This property is of type String.
- publicId
- 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.
- Prototype Object DocumentCM
-
- The DocumentCM class has the following constants:
-
- DocumentCM.WF_CHECK
- This constant is of type short and its value is
1.
- DocumentCM.NS_WF_CHECK
- This constant is of type short and its value is
2.
- DocumentCM.PARTIAL_VALIDITY_CHECK
- This constant is of type short and its value is
3.
- DocumentCM.STRICT_VALIDITY_CHECK
- This constant is of type short and its value is
4.
- 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 properties:
-
- continuousValidityChecking
- This property is of type Boolean.
- wfValidityCheckLevel
- This property is a short object.
- 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 CMNodeList 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.
This method can raise a DOMException object.
- Object ElementCM
-
- ElementCM has the all the properties and methods of the
Element,NodeCM 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 CMElementDeclaration 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)
- This method returns a Boolean.
The node parameter is a Node object.
- 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.
- canRemoveAttribute(attrname)
- This method returns a Boolean.
The attrname parameter is of type String.
- canRemoveAttributeNS(attrname, namespaceURI)
- This method returns a Boolean.
The attrname parameter is of type String.
The namespaceURI parameter is of type String.
- canRemoveAttributeNode(node)
- This method returns a Boolean.
The node parameter is a Node object.
- Object CharacterDataCM
-
- CharacterDataCM has the all the properties and methods
of the Text,NodeCM 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,NodeCM 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
-
- AttributeCM has the all the properties and methods of
the Attr,NodeCM object as well as the properties and methods
defined below.
- The AttributeCM object has the following methods:
-
- getAttributeDeclaration()
- This method returns a CMAttributeDeclaration
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:
-
- startElement(element)
- This method returns a Boolean.
The element parameter is a Element object.
- 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.
- Object DocumentLS
-
- The DocumentLS object has the following properties:
-
- async
- This property is of type Boolean.
- The DocumentLS object has the following methods:
-
- abort()
- This method has no return value.
- load(url)
- This method returns a Boolean.
The url parameter is of type String.
- loadXML(source)
- This method returns a Boolean.
The source parameter is of type String.
- saveXML(node)
- This method returns a String.
The node parameter is a Node object.
This method can raise a DOMException object.
- Object ParserErrorEvent
-
- The ParserErrorEvent object has the following
properties:
-
- errorCode
- This read-only property is a long object.
- filepos
- This read-only property is a long object.
- line
- This read-only property is a long object.
- linepos
- This read-only property is a long object.
- reason
- This read-only property is of type String.
- srcText
- This read-only property is of type String.
- url
- This read-only property is of type String.