PSVIDOMImplementationImplpublic class PSVIDOMImplementationImpl extends CoreDOMImplementationImpl 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. |
Fields Summary |
---|
static PSVIDOMImplementationImpl | singletonDom implementation singleton. |
Methods Summary |
---|
public org.w3c.dom.Document | createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType doctype)Introduced in DOM Level 2.
Creates an XML Document object of the specified type with its document
element.
if (doctype != null && doctype.getOwnerDocument() != null) {
throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,
DOMMessageFormatter.formatMessage(
DOMMessageFormatter.XML_DOMAIN,
"WRONG_DOCUMENT_ERR", null));
}
DocumentImpl doc = new PSVIDocumentImpl(doctype);
// If namespaceURI and qualifiedName are null return a Document with no document element.
if (qualifiedName != null || namespaceURI != null) {
Element e = doc.createElementNS(namespaceURI, qualifiedName);
doc.appendChild(e);
}
return doc;
| public static org.w3c.dom.DOMImplementation | getDOMImplementation()NON-DOM: Obtain and return the single shared object
//
// Public methods
//
return singleton;
| public boolean | hasFeature(java.lang.String feature, java.lang.String version)Test if the DOM implementation supports a specific "feature" --
currently meaning language and level thereof.
return super.hasFeature(feature, version) ||
feature.equalsIgnoreCase("psvi");
|
|