1 19 20 package org.netbeans.modules.xsl.grammar; 21 22 import org.w3c.dom.*; 23 24 28 public class ResultDocument extends ResultNode implements org.w3c.dom.Document { 29 30 private Document doc; 31 32 33 public ResultDocument(Document peer, String ignorePrefix, String onlyUsePrefix) { 34 super(peer, ignorePrefix, onlyUsePrefix); 35 doc = peer; 36 } 37 38 public Attr createAttribute(String name) throws DOMException { 39 return doc.createAttribute(name); 40 } 41 42 public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { 43 return doc.createAttributeNS(namespaceURI, qualifiedName); 44 } 45 46 public CDATASection createCDATASection(String data) throws DOMException { 47 return doc.createCDATASection(data); 48 } 49 50 public Comment createComment(String data) { 51 return doc.createComment(data); 52 } 53 54 public DocumentFragment createDocumentFragment() { 55 return doc.createDocumentFragment(); 56 } 57 58 public Element createElement(String tagName) throws DOMException { 59 return doc.createElement(tagName); 60 } 61 62 public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { 63 return doc.createElementNS(namespaceURI, qualifiedName); 64 } 65 66 public EntityReference createEntityReference(String name) throws DOMException { 67 return doc.createEntityReference(name); 68 } 69 70 public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { 71 return doc.createProcessingInstruction(target, data); 72 } 73 74 public Text createTextNode(String data) { 75 return doc.createTextNode(data); 76 } 77 78 public DocumentType getDoctype() { 79 return doc.getDoctype(); 80 } 81 82 public Element getDocumentElement() { 83 return doc.getDocumentElement(); 84 } 85 86 public Element getElementById(String elementId) { 87 return doc.getElementById(elementId); 88 } 89 90 public NodeList getElementsByTagName(String tagname) { 91 return doc.getElementsByTagName(tagname); 92 } 93 94 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { 95 return doc.getElementsByTagNameNS(namespaceURI, localName); 96 } 97 98 public DOMImplementation getImplementation() { 99 return doc.getImplementation(); 100 } 101 102 public Node importNode(Node importedNode, boolean deep) throws DOMException { 103 return new ResultNode(doc.importNode(importedNode, deep), ignorePrefix, onlyUsePrefix); 104 } 105 } 106 | Popular Tags |