Package net.sf.saxon.dom
Class DOMImplementationImpl
java.lang.Object
net.sf.saxon.dom.DOMImplementationImpl
- All Implemented Interfaces:
DOMImplementation
A simple implementation of the DOMImplementation interface, for use when accessing
Saxon tree structure using the DOM API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDocument
(String namespaceURI, String qualifiedName, DocumentType doctype) Creates an XMLDocument
object of the specified type with its document element.createDocumentType
(String qualifiedName, String publicId, String systemId) Creates an emptyDocumentType
node.getFeature
(String feature, String version) Return the value of a specific feature.boolean
hasFeature
(String feature, String version) Test if the DOM implementation implements a specific feature.
-
Constructor Details
-
DOMImplementationImpl
DOMImplementationImpl()
-
-
Method Details
-
hasFeature
Test if the DOM implementation implements a specific feature.- Specified by:
hasFeature
in interfaceDOMImplementation
- 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.
-
getFeature
Return the value of a specific feature. DOM level 3 method.- Specified by:
getFeature
in interfaceDOMImplementation
- 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.
-
createDocumentType
public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) throws DOMException Creates an emptyDocumentType
node.- Specified by:
createDocumentType
in interfaceDOMImplementation
- 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 withNode.ownerDocument
set tonull
. - Throws:
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
NAMESPACE_ERR: Raised if thequalifiedName
is malformed.- Since:
- DOM Level 2
-
createDocument
public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException Creates an XMLDocument
object of the specified type with its document element.- Specified by:
createDocument
in interfaceDOMImplementation
- 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 ornull
.- Returns:
- A new
Document
object. - Throws:
DOMException
- Since:
- DOM Level 2
-