1 18 package org.apache.batik.dom; 19 20 import org.w3c.dom.DOMException ; 21 import org.w3c.dom.DOMImplementation ; 22 import org.w3c.dom.Document ; 23 import org.w3c.dom.DocumentType ; 24 25 31 public class GenericDOMImplementation extends AbstractDOMImplementation { 32 35 protected final static DOMImplementation DOM_IMPLEMENTATION = 36 new GenericDOMImplementation(); 37 38 41 public GenericDOMImplementation() { 42 } 43 44 47 public static DOMImplementation getDOMImplementation() { 48 return DOM_IMPLEMENTATION; 49 } 50 51 53 57 public DocumentType createDocumentType(String qualifiedName, 58 String publicId, 59 String systemId) { 60 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, 61 "Doctype not supported"); 62 } 63 64 69 public Document createDocument(String namespaceURI, 70 String qualifiedName, 71 DocumentType doctype) throws DOMException { 72 Document result = new GenericDocument(doctype, this); 73 result.appendChild(result.createElementNS(namespaceURI, 74 qualifiedName)); 75 return result; 76 } 77 } 78 | Popular Tags |