07 June 2001

Appendix C: ECMA Script Language Binding

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

Object ASModel
ASModel has the all the properties and methods of the ASNode object as well as the properties and methods defined below.
The ASModel object has the following properties:
isNamespaceAware
This read-only property is of type Boolean.
rootElementDecl
This property is a ASElementDeclaration object.
systemId
This property is of type String.
publicId
This property is of type String.
The ASModel object has the following methods:
getASNodes()
This method returns a ASNodeList object.
removeNode(node)
This method returns a Boolean.
The node parameter is a ASNode object.
insertBefore(newNode, refNode)
This method returns a Boolean.
The newNode parameter is a ASNode object.
The refNode parameter is a ASNode object.
validate()
This method returns a Boolean.
createASElementDeclaration(namespaceURI, qualifiedElementName)
This method returns a ASElementDeclaration object.
The namespaceURI parameter is of type String.
The qualifiedElementName parameter is of type String.
This method can raise a DOMException object.
createASAttributeDeclaration(namespaceURI, qualifiedName)
This method returns a ASAttributeDeclaration object.
The namespaceURI parameter is of type String.
The qualifiedName parameter is of type String.
This method can raise a DOMException object.
createASNotationDeclaration(namespaceURI, qualifiedElementName, systemIdentifier, publicIdentifier)
This method returns a ASNotationDeclaration object.
The namespaceURI parameter is of type String.
The qualifiedElementName 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.
createASEntityDeclaration(name)
This method returns a ASEntityDeclaration object.
The name parameter is of type String.
This method can raise a DOMException object.
createASChildren(minOccurs, maxOccurs, operator)
This method returns a ASChildren 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 ASExternalModel
ASExternalModel has the all the properties and methods of the ASModel object as well as the properties and methods defined below.
Prototype Object ASNode
The ASNode class has the following constants:
ASNode.AS_ELEMENT_DECLARATION
This constant is of type Number and its value is 1.
ASNode.AS_ATTRIBUTE_DECLARATION
This constant is of type Number and its value is 2.
ASNode.AS_NOTATION_DECLARATION
This constant is of type Number and its value is 3.
ASNode.AS_ENTITY_DECLARATION
This constant is of type Number and its value is 4.
ASNode.AS_CHILDREN
This constant is of type Number and its value is 5.
ASNode.AS_MODEL
This constant is of type Number and its value is 6.
ASNode.AS_EXTERNALMODEL
This constant is of type Number and its value is 7.
Object ASNode
The ASNode object has the following properties:
cmNodeType
This read-only property is of type Number.
ownerASModel
This property is a ASModel 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 ASNode object has the following methods:
cloneASNode()
This method returns a ASNode object.
Object ASNodeList
The ASNodeList object has the following properties:
length
This read-only property is a int object.
The ASNodeList object has the following methods:
item(index)
This method returns a ASNode object.
The index parameter is a int object.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
Object ASDOMStringList
The ASDOMStringList object has the following properties:
length
This read-only property is a int object.
The ASDOMStringList object has the following methods:
item(index)
This method returns a String.
The index parameter is a int object.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
Object ASNamedNodeMap
The ASNamedNodeMap object has the following properties:
length
This read-only property is a int object.
The ASNamedNodeMap object has the following methods:
getNamedItem(name)
This method returns a ASNode object.
The name parameter is of type String.
getNamedItemNS(namespaceURI, localName)
This method returns a ASNode object.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
item(index)
This method returns a ASNode object.
The index parameter is a int object.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
removeNamedItem(name)
This method returns a ASNode object.
The name parameter is of type String.
removeNamedItemNS(namespaceURI, localName)
This method returns a ASNode object.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
setNamedItem(newASNode)
This method returns a ASNode object.
The newASNode parameter is a ASNode object.
This method can raise a DOMASException object.
setNamedItemNS(newASNode)
This method returns a ASNode object.
The newASNode parameter is a ASNode object.
This method can raise a DOMASException object.
Prototype Object ASDataType
The ASDataType class has the following constants:
ASDataType.STRING_DATATYPE
This constant is of type short and its value is 1.
Object ASDataType
The ASDataType object has the following methods:
getASPrimitiveType()
This method returns a short object.
Prototype Object ASPrimitiveType
The ASPrimitiveType class has the following constants:
ASPrimitiveType.BOOLEAN_DATATYPE
This constant is of type short and its value is 2.
ASPrimitiveType.FLOAT_DATATYPE
This constant is of type short and its value is 3.
ASPrimitiveType.DOUBLE_DATATYPE
This constant is of type short and its value is 4.
ASPrimitiveType.DECIMAL_DATATYPE
This constant is of type short and its value is 5.
ASPrimitiveType.HEXBINARY_DATATYPE
This constant is of type short and its value is 6.
ASPrimitiveType.BASE64BINARY_DATATYPE
This constant is of type short and its value is 7.
ASPrimitiveType.ANYURI_DATATYPE
This constant is of type short and its value is 8.
ASPrimitiveType.QNAME_DATATYPE
This constant is of type short and its value is 9.
ASPrimitiveType.DURATION_DATATYPE
This constant is of type short and its value is 10.
ASPrimitiveType.DATETIME_DATATYPE
This constant is of type short and its value is 11.
ASPrimitiveType.DATE_DATATYPE
This constant is of type short and its value is 12.
ASPrimitiveType.TIME_DATATYPE
This constant is of type short and its value is 13.
ASPrimitiveType.YEARMONTH_DATATYPE
This constant is of type short and its value is 14.
ASPrimitiveType.YEAR_DATATYPE
This constant is of type short and its value is 15.
ASPrimitiveType.MONTHDAY_DATATYPE
This constant is of type short and its value is 16.
ASPrimitiveType.DAY_DATATYPE
This constant is of type short and its value is 17.
ASPrimitiveType.MONTH_DATATYPE
This constant is of type short and its value is 18.
ASPrimitiveType.NOTATION_DATATYPE
This constant is of type short and its value is 19.
Object ASPrimitiveType
ASPrimitiveType has the all the properties and methods of the ASDataType object as well as the properties and methods defined below.
The ASPrimitiveType object has the following properties:
lowValue
This property is a decimal object.
highValue
This property is a decimal object.
Prototype Object ASElementDeclaration
The ASElementDeclaration class has the following constants:
ASElementDeclaration.EMPTY_CONTENTTYPE
This constant is of type short and its value is 1.
ASElementDeclaration.ANY_CONTENTTYPE
This constant is of type short and its value is 2.
ASElementDeclaration.MIXED_CONTENTTYPE
This constant is of type short and its value is 3.
ASElementDeclaration.ELEMENTS_CONTENTTYPE
This constant is of type short and its value is 4.
Object ASElementDeclaration
ASElementDeclaration has the all the properties and methods of the ASNode object as well as the properties and methods defined below.
The ASElementDeclaration object has the following properties:
strictMixedContent
This property is of type Boolean.
elementType
This property is a ASDataType object.
isPCDataOnly
This property is of type Boolean.
contentType
This property is a short object.
tagName
This property is of type String.
The ASElementDeclaration object has the following methods:
getASChildren()
This method returns a ASChildren object.
setASChildren(elementContent)
This method has no return value.
The elementContent parameter is a ASChildren object.
This method can raise a DOMASException object.
getASAttributeDecls()
This method returns a ASNamedNodeMap object.
setASAttributeDecls(attributes)
This method has no return value.
The attributes parameter is a ASNamedNodeMap object.
addASAttributeDecl(attributeDecl)
This method has no return value.
The attributeDecl parameter is a ASAttributeDeclaration object.
removeASAttributeDecl(attributeDecl)
This method returns a ASAttributeDeclaration object.
The attributeDecl parameter is a ASAttributeDeclaration object.
Prototype Object ASChildren
The ASChildren class has the following constants:
ASChildren.UNBOUNDED
This constant is of type Number and its value is MAX_LONG.
ASChildren.NONE
This constant is of type Number and its value is 0.
ASChildren.SEQUENCE
This constant is of type Number and its value is 1.
ASChildren.CHOICE
This constant is of type Number and its value is 2.
Object ASChildren
ASChildren has the all the properties and methods of the ASNode object as well as the properties and methods defined below.
The ASChildren 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 ASNodeList object.
The ASChildren object has the following methods:
removeASNode(nodeIndex)
This method returns a ASNode object.
The nodeIndex parameter is of type Number.
insertASNode(nodeIndex, newNode)
This method returns a int object.
The nodeIndex parameter is of type Number.
The newNode parameter is a ASNode object.
appendASNode(newNode)
This method returns a int object.
The newNode parameter is a ASNode object.
Prototype Object ASAttributeDeclaration
The ASAttributeDeclaration class has the following constants:
ASAttributeDeclaration.NO_VALUE_CONSTRAINT
This constant is of type short and its value is 0.
ASAttributeDeclaration.DEFAULT_VALUE_CONSTRAINT
This constant is of type short and its value is 1.
ASAttributeDeclaration.FIXED_VALUE_CONSTRAINT
This constant is of type short and its value is 2.
Object ASAttributeDeclaration
ASAttributeDeclaration has the all the properties and methods of the ASNode object as well as the properties and methods defined below.
The ASAttributeDeclaration object has the following properties:
attrName
This property is of type String.
attrType
This property is a ASDataType object.
attributeValue
This property is of type String.
enumAttr
This property is of type String.
ownerElement
This property is a ASNodeList object.
constraintType
This property is a short object.
Prototype Object ASEntityDeclaration
The ASEntityDeclaration class has the following constants:
ASEntityDeclaration.INTERNAL_ENTITY
This constant is of type short and its value is 1.
ASEntityDeclaration.EXTERNAL_ENTITY
This constant is of type short and its value is 2.
Object ASEntityDeclaration
ASEntityDeclaration has the all the properties and methods of the ASNode object as well as the properties and methods defined below.
The ASEntityDeclaration 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 ASNotationDeclaration
ASNotationDeclaration has the all the properties and methods of the ASNode object as well as the properties and methods defined below.
The ASNotationDeclaration 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.
Object DocumentAS
DocumentAS has the all the properties and methods of the Document object as well as the properties and methods defined below.
The DocumentAS object has the following properties:
continuousValidityChecking
This property is of type Boolean.
The DocumentAS object has the following methods:
numASs()
This method returns a int object.
getInternalAS()
This method returns a ASModel object.
getASs()
This method returns a ASNodeList object.
getActiveAS()
This method returns a ASModel object.
addAS(cm)
This method has no return value.
The cm parameter is a ASModel object.
removeAS(cm)
This method has no return value.
The cm parameter is a ASModel object.
activateAS(cm)
This method returns a Boolean.
The cm parameter is a ASModel object.
Object DOMImplementationAS
DOMImplementationAS has the all the properties and methods of the DOMImplementation object as well as the properties and methods defined below.
The DOMImplementationAS object has the following methods:
createAS()
This method returns a ASModel object.
createExternalAS()
This method returns a ASExternalModel object.
Prototype Object NodeAS
The NodeAS class has the following constants:
NodeAS.WF_CHECK
This constant is of type short and its value is 1.
NodeAS.NS_WF_CHECK
This constant is of type short and its value is 2.
NodeAS.PARTIAL_VALIDITY_CHECK
This constant is of type short and its value is 3.
NodeAS.STRICT_VALIDITY_CHECK
This constant is of type short and its value is 4.
Object NodeAS
NodeAS has the all the properties and methods of the Node object as well as the properties and methods defined below.
The NodeAS object has the following properties:
wfValidityCheckLevel
This property is a short object.
The NodeAS 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(deep)
This method returns a Boolean.
The deep parameter is of type Boolean.
This method can raise a DOMException object.
Object ElementAS
ElementAS has the all the properties and methods of the Element object as well as the properties and methods defined below.
The ElementAS object has the following methods:
contentType()
This method returns a short object.
getElementDeclaration()
This method returns a ASElementDeclaration 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.
getChildElements()
This method returns a ASDOMStringList object.
getParentElements()
This method returns a ASDOMStringList object.
getAttributeList()
This method returns a ASDOMStringList object.
Object CharacterDataAS
CharacterDataAS has the all the properties and methods of the CharacterData object as well as the properties and methods defined below.
The CharacterDataAS 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 DocumentTypeAS
DocumentTypeAS has the all the properties and methods of the DocumentType object as well as the properties and methods defined below.
The DocumentTypeAS object has the following properties:
definedElementTypes
This read-only property is a ASDOMStringList object.
The DocumentTypeAS 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 AttributeAS
AttributeAS has the all the properties and methods of the Attr object as well as the properties and methods defined below.
The AttributeAS object has the following methods:
getAttributeDeclaration()
This method returns a ASAttributeDeclaration object.
getNotation()
This method returns a ASNotationDeclaration 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 DOMCMBuilder
DOMCMBuilder has the all the properties and methods of the DOMBuilder object as well as the properties and methods defined below.
The DOMCMBuilder object has the following methods:
parseCMURI(uri)
This method returns a CMModel object.
The uri parameter is of type String.
This method can raise a DOMException object or a DOMSystemException object.
parseCMInputSource(is)
This method returns a CMModel object.
The is parameter is a DOMInputSource object.
This method can raise a DOMException object or a DOMSystemException 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.
mimeTypeCheck
This property is of type Boolean.
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 DOMCMWriter
DOMCMWriter has the all the properties and methods of the DOMWriter object as well as the properties and methods defined below.
The DOMCMWriter object has the following methods:
writeCMModel(destination, model)
This method has no return value.
The destination parameter is a DOMOutputStream object.
The model parameter is a CMModel 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.