Package net.sf.saxon.dom
Class DOMImplementationImpl
- java.lang.Object
-
- net.sf.saxon.dom.DOMImplementationImpl
-
- All Implemented Interfaces:
org.w3c.dom.DOMImplementation
class DOMImplementationImpl extends java.lang.Object implements org.w3c.dom.DOMImplementationA simple implementation of the DOMImplementation interface, for use when accessing Saxon tree structure using the DOM API.
-
-
Constructor Summary
Constructors Constructor Description DOMImplementationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.DocumentcreateDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType doctype)Creates an XMLDocumentobject of the specified type with its document element.org.w3c.dom.DocumentTypecreateDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId)Creates an emptyDocumentTypenode.java.lang.ObjectgetFeature(java.lang.String feature, java.lang.String version)This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in .booleanhasFeature(java.lang.String feature, java.lang.String version)Test if the DOM implementation implements a specific feature.
-
-
-
Method Detail
-
hasFeature
public boolean hasFeature(java.lang.String feature, java.lang.String version)Test if the DOM implementation implements a specific feature.- Specified by:
hasFeaturein interfaceorg.w3c.dom.DOMImplementation- Parameters:
feature- The name of the feature to test (case-insensitive).version- This is the version number of the feature to test.- Returns:
trueif the feature is implemented in the specified version,falseotherwise. This implementation returns true if the feature is "XML" or "Core" and the version is null, "", "3.0", "2.0", or "1.0".
-
getFeature
public java.lang.Object getFeature(java.lang.String feature, java.lang.String version)This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in .- Specified by:
getFeaturein interfaceorg.w3c.dom.DOMImplementation- Parameters:
feature- The name of the feature requested.version- This is the version number of the feature to test.- Returns:
- Always returns null in this implementation
- Since:
- DOM Level 3
-
createDocumentType
public org.w3c.dom.DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId) throws org.w3c.dom.DOMExceptionCreates an emptyDocumentTypenode.- Specified by:
createDocumentTypein interfaceorg.w3c.dom.DOMImplementation- 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
DocumentTypenode withNode.ownerDocumentset tonull. - Throws:
org.w3c.dom.DOMException- INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
NAMESPACE_ERR: Raised if thequalifiedNameis malformed.- Since:
- DOM Level 2
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType doctype) throws java.lang.UnsupportedOperationExceptionCreates an XMLDocumentobject of the specified type with its document element.- Specified by:
createDocumentin interfaceorg.w3c.dom.DOMImplementation- 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
Documentobject. - Throws:
java.lang.UnsupportedOperationException- always- Since:
- DOM Level 2
-
-