net.sf.saxon.dom

Class DOMImplementationImpl

class DOMImplementationImpl extends Object implements DOMImplementation

A simple implementation of the DOMImplementation interface, for use when accessing Saxon tree structure using the DOM API.
Method Summary
DocumentcreateDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
Creates an XML Document object of the specified type with its document element.
DocumentTypecreateDocumentType(String qualifiedName, String publicId, String systemId)
Creates an empty DocumentType node.
ObjectgetFeature(String feature, String version)
Return the value of a specific feature.
booleanhasFeature(String feature, String version)
Test if the DOM implementation implements a specific feature.

Method Detail

createDocument

public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
Creates an XML Document object of the specified type with its document element.

Parameters: namespaceURI The namespace URI of the document element to create. qualifiedName The qualified name of the document element to be created. doctype The type of document to be created or null.

Returns: A new Document object.

Throws: org.w3c.dom.DOMException

Since: DOM Level 2

createDocumentType

public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId)
Creates an empty DocumentType node.

Parameters: qualifiedName The qualified name of the document type to be created. publicId The external subset public identifier. systemId The external subset system identifier.

Returns: A new DocumentType node with Node.ownerDocument set to null .

Throws: org.w3c.dom.DOMException INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
NAMESPACE_ERR: Raised if the qualifiedName is malformed.

Since: DOM Level 2

getFeature

public Object getFeature(String feature, String version)
Return the value of a specific feature. DOM level 3 method.

Parameters: feature The name of the feature to test (case-insensitive). version This is the version number of the feature to test.

Returns: the value of the feature. Always null in this implementation.

hasFeature

public boolean hasFeature(String feature, String version)
Test if the DOM implementation implements a specific feature.

Parameters: feature The name of the feature to test (case-insensitive). version This is the version number of the feature to test.

Returns: true if the feature is implemented in the specified version, false otherwise.