Class DOMImplementationImpl

java.lang.Object
net.sf.saxon.dom.DOMImplementationImpl
All Implemented Interfaces:
DOMImplementation

class DOMImplementationImpl extends Object implements DOMImplementation
A simple implementation of the DOMImplementation interface, for use when accessing Saxon tree structure using the DOM API.
  • Constructor Details

    • DOMImplementationImpl

      DOMImplementationImpl()
  • Method Details

    • hasFeature

      public boolean hasFeature(String feature, String version)
      Test if the DOM implementation implements a specific feature.
      Specified by:
      hasFeature in interface DOMImplementation
      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. 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 Object getFeature(String feature, String version)
      This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in .
      Specified by:
      getFeature in interface 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 DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) throws DOMException
      Creates an empty DocumentType node.
      Specified by:
      createDocumentType in interface 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 DocumentType node with Node.ownerDocument set to null .
      Throws:
      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
    • createDocument

      public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException
      Creates an XML Document object of the specified type with its document element.
      Specified by:
      createDocument in interface 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 or null.
      Returns:
      A new Document object.
      Throws:
      DOMException
      Since:
      DOM Level 2