APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.dom

public Class DOMImplementationImpl

extends CoreDOMImplementationImpl
implements DOMImplementation
Class Inheritance
All Implemented Interfaces
org.w3c.dom.DOMImplementation
Known Direct Subclasses
com.sun.org.apache.xerces.internal.dom.PSVIDOMImplementationImpl, com.sun.org.apache.xerces.internal.dom.DeferredDOMImplementationImpl
Imports
org.w3c.dom.DOMException, .DOMImplementation, .Document, .DocumentType, .Element

The DOMImplementation class is description of a particular implementation of the Document Object Model. As such its data is static, shared by all instances of this implementation.

The DOM API requires that it be a real object rather than static methods. However, there's nothing that says it can't be a singleton, so that's how I've implemented it.

Since
PR-DOM-Level-1-19980818.

Field Summary

Modifier and TypeField and Description
pack-priv static DOMImplementationImpl

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Document

Returns:

Document A new Document object.
createDocument
(String
The namespace URI of the document element to create, or null.
namespaceURI
,
String
The qualified name of the document element to create.
qualifiedName
,
DocumentType
The type of document to be created or null.

When doctype is not null, its Node.ownerDocument attribute is set to the document being created.

doctype
)

Overrides com.sun.org.apache.xerces.internal.dom.CoreDOMImplementationImpl.createDocument.

Implements org.w3c.dom.DOMImplementation.createDocument.

Introduced in DOM Level 2.

public static DOMImplementation
public boolean

Returns:

true iff this implementation is compatable with the specified feature and version.
hasFeature
(String
The package name of the feature to test. In Level 1, supported values are "HTML" and "XML" (case-insensitive). At this writing, com.sun.org.apache.xerces.internal.dom supports only XML.
feature
,
String
The version number of the feature being tested. This is interpreted as "Version of the DOM API supported for the specified Feature", and in Level 1 should be "1.0"
version
)

Overrides com.sun.org.apache.xerces.internal.dom.CoreDOMImplementationImpl.hasFeature.

Implements org.w3c.dom.DOMImplementation.hasFeature.

Test if the DOM implementation supports a specific "feature" -- currently meaning language and level thereof.

Inherited from com.sun.org.apache.xerces.internal.dom.CoreDOMImplementationImpl:
assignDocTypeNumberassignDocumentNumbercheckQNamecreateDocumentcreateDocumentTypecreateLSInputcreateLSOutputcreateLSParsercreateLSSerializergetDTDLoadergetFeaturegetValidatorreleaseDTDLoaderreleaseValidator

Field Detail

singletonback to summary
pack-priv static DOMImplementationImpl singleton

Hides com.sun.org.apache.xerces.internal.dom.CoreDOMImplementationImpl.singleton.

Dom implementation singleton.

Constructor Detail

DOMImplementationImplback to summary
public DOMImplementationImpl()

Method Detail

createDocumentback to summary
public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException

Overrides com.sun.org.apache.xerces.internal.dom.CoreDOMImplementationImpl.createDocument.

Implements org.w3c.dom.DOMImplementation.createDocument.

Introduced in DOM Level 2.

Creates an XML Document object of the specified type with its document element.

Parameters
namespaceURI:String

The namespace URI of the document element to create, or null.

qualifiedName:String

The qualified name of the document element to create.

doctype:DocumentType

The type of document to be created or null.

When doctype is not null, its Node.ownerDocument attribute is set to the document being created.

Returns:Document

Document A new Document object.

Exceptions
DOMException:
WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document.
Since
WD-DOM-Level-2-19990923
getDOMImplementationback to summary
public static DOMImplementation getDOMImplementation()

Hides com.sun.org.apache.xerces.internal.dom.CoreDOMImplementationImpl.getDOMImplementation.

NON-DOM: Obtain and return the single shared object

hasFeatureback to summary
public boolean hasFeature(String feature, String version)

Overrides com.sun.org.apache.xerces.internal.dom.CoreDOMImplementationImpl.hasFeature.

Implements org.w3c.dom.DOMImplementation.hasFeature.

Test if the DOM implementation supports a specific "feature" -- currently meaning language and level thereof.

Parameters
feature:String

The package name of the feature to test. In Level 1, supported values are "HTML" and "XML" (case-insensitive). At this writing, com.sun.org.apache.xerces.internal.dom supports only XML.

version:String

The version number of the feature being tested. This is interpreted as "Version of the DOM API supported for the specified Feature", and in Level 1 should be "1.0"

Returns:boolean

true iff this implementation is compatable with the specified feature and version.