1 16 17 package org.apache.xerces.jaxp; 18 19 import org.apache.xerces.xni.Augmentations; 20 import org.apache.xerces.xni.NamespaceContext; 21 import org.apache.xerces.xni.QName; 22 import org.apache.xerces.xni.XMLAttributes; 23 import org.apache.xerces.xni.XMLDocumentHandler; 24 import org.apache.xerces.xni.XMLLocator; 25 import org.apache.xerces.xni.XMLResourceIdentifier; 26 import org.apache.xerces.xni.XMLString; 27 import org.apache.xerces.xni.XNIException; 28 import org.apache.xerces.xni.parser.XMLDocumentFilter; 29 import org.apache.xerces.xni.parser.XMLDocumentSource; 30 31 37 class TeeXMLDocumentFilterImpl implements XMLDocumentFilter { 38 39 44 private XMLDocumentHandler next; 45 46 49 private XMLDocumentHandler side; 50 51 54 private XMLDocumentSource source; 55 56 public XMLDocumentHandler getSide() { 57 return side; 58 } 59 60 public void setSide(XMLDocumentHandler side) { 61 this.side = side; 62 } 63 64 public XMLDocumentSource getDocumentSource() { 65 return source; 66 } 67 68 public void setDocumentSource(XMLDocumentSource source) { 69 this.source = source; 70 } 71 72 public XMLDocumentHandler getDocumentHandler() { 73 return next; 74 } 75 76 public void setDocumentHandler(XMLDocumentHandler handler) { 77 next = handler; 78 } 79 80 86 public void characters(XMLString text, Augmentations augs) throws XNIException { 87 side.characters(text, augs); 88 next.characters(text, augs); 89 } 90 91 public void comment(XMLString text, Augmentations augs) throws XNIException { 92 side.comment(text, augs); 93 next.comment(text, augs); 94 } 95 96 public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs) 97 throws XNIException { 98 side.doctypeDecl(rootElement, publicId, systemId, augs); 99 next.doctypeDecl(rootElement, publicId, systemId, augs); 100 } 101 102 public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { 103 side.emptyElement(element, attributes, augs); 104 next.emptyElement(element, attributes, augs); 105 } 106 107 public void endCDATA(Augmentations augs) throws XNIException { 108 side.endCDATA(augs); 109 next.endCDATA(augs); 110 } 111 112 public void endDocument(Augmentations augs) throws XNIException { 113 side.endDocument(augs); 114 next.endDocument(augs); 115 } 116 117 public void endElement(QName element, Augmentations augs) throws XNIException { 118 side.endElement(element, augs); 119 next.endElement(element, augs); 120 } 121 122 public void endGeneralEntity(String name, Augmentations augs) throws XNIException { 123 side.endGeneralEntity(name, augs); 124 next.endGeneralEntity(name, augs); 125 } 126 127 public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException { 128 side.ignorableWhitespace(text, augs); 129 next.ignorableWhitespace(text, augs); 130 } 131 132 public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException { 133 side.processingInstruction(target, data, augs); 134 next.processingInstruction(target, data, augs); 135 } 136 137 public void startCDATA(Augmentations augs) throws XNIException { 138 side.startCDATA(augs); 139 next.startCDATA(augs); 140 } 141 142 public void startDocument( 143 XMLLocator locator, 144 String encoding, 145 NamespaceContext namespaceContext, 146 Augmentations augs) 147 throws XNIException { 148 side.startDocument(locator, encoding, namespaceContext, augs); 149 next.startDocument(locator, encoding, namespaceContext, augs); 150 } 151 152 public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { 153 side.startElement(element, attributes, augs); 154 next.startElement(element, attributes, augs); 155 } 156 157 public void startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) 158 throws XNIException { 159 side.startGeneralEntity(name, identifier, encoding, augs); 160 next.startGeneralEntity(name, identifier, encoding, augs); 161 } 162 163 public void textDecl(String version, String encoding, Augmentations augs) throws XNIException { 164 side.textDecl(version, encoding, augs); 165 next.textDecl(version, encoding, augs); 166 } 167 168 public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException { 169 side.xmlDecl(version, encoding, standalone, augs); 170 next.xmlDecl(version, encoding, standalone, augs); 171 } 172 173 } 174 | Popular Tags |