1 22 23 package org.enhydra.wireless.chtml; 24 25 import org.enhydra.wireless.chtml.dom.CHTMLDocument; 26 import org.enhydra.wireless.chtml.dom.xerces.CHTMLDocumentImpl; 27 import org.enhydra.xml.xmlc.dom.XMLCDomFactory; 28 import org.enhydra.xml.xmlc.dom.xerces.XercesHTMLDomFactory; 29 import org.w3c.dom.Document ; 30 import org.w3c.dom.DocumentType ; 31 import org.w3c.dom.Node ; 32 33 37 public class CHTMLDomFactory extends XercesHTMLDomFactory implements XMLCDomFactory { 38 41 public Document createDocument(String namespaceURI, 42 String qualifiedName, 43 DocumentType docType) { 44 return new CHTMLDocumentImpl(); 45 } 46 49 public String nodeClassToInterface(Node node) { 50 if (node instanceof CHTMLDocument) { 51 return CHTMLDocument.class.getName(); 52 } else { 53 return super.nodeClassToInterface(node); 54 } 55 } 56 } 57 | Popular Tags |