1 16 package org.apache.cocoon.taglib; 17 18 import org.apache.cocoon.xml.XMLConsumer; 19 20 import org.xml.sax.Attributes ; 21 import org.xml.sax.Locator ; 22 import org.xml.sax.SAXException ; 23 24 28 public class TransformerTagSupport extends TagSupport implements TransformerTag { 29 protected XMLConsumer xmlConsumer; 30 31 34 public void setDocumentLocator(Locator locator) { 35 xmlConsumer.setDocumentLocator(locator); 36 } 37 38 41 public void startDocument() throws SAXException { 42 } 44 45 48 public void endDocument() throws SAXException { 49 } 51 52 55 public void startPrefixMapping(String prefix, String uri) throws SAXException { 56 xmlConsumer.startPrefixMapping(prefix, uri); 57 } 58 59 62 public void endPrefixMapping(String prefix) throws SAXException { 63 xmlConsumer.endPrefixMapping(prefix); 64 } 65 66 69 public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { 70 xmlConsumer.startElement(namespaceURI, localName, qName, atts); 71 } 72 73 76 public void endElement(String namespaceURI, String localName, String qName) throws SAXException { 77 xmlConsumer.endElement(namespaceURI, localName, qName); 78 } 79 80 83 public void characters(char[] ch, int start, int length) throws SAXException { 84 xmlConsumer.characters(ch, start, length); 85 } 86 87 90 public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { 91 xmlConsumer.ignorableWhitespace(ch, start, length); 92 } 93 94 97 public void processingInstruction(String target, String data) throws SAXException { 98 xmlConsumer.processingInstruction(target, data); 99 } 100 101 104 public void skippedEntity(String name) throws SAXException { 105 xmlConsumer.skippedEntity(name); 106 } 107 108 111 public void startDTD(String name, String publicId, String systemId) throws SAXException { 112 xmlConsumer.startDTD(name, publicId, systemId); 113 } 114 115 118 public void endDTD() throws SAXException { 119 xmlConsumer.endDTD(); 120 } 121 122 125 public void startEntity(String name) throws SAXException { 126 xmlConsumer.startEntity(name); 127 } 128 129 132 public void endEntity(String name) throws SAXException { 133 xmlConsumer.endEntity(name); 134 } 135 136 139 public void startCDATA() throws SAXException { 140 xmlConsumer.startCDATA(); 141 } 142 143 146 public void endCDATA() throws SAXException { 147 xmlConsumer.endCDATA(); 148 } 149 150 153 public void comment(char[] ch, int start, int length) throws SAXException { 154 xmlConsumer.comment(ch, start, length); 155 } 156 157 160 public void setConsumer(XMLConsumer consumer) { 161 this.xmlConsumer = consumer; 162 } 163 164 167 public void recycle() { 168 this.xmlConsumer = null; 169 super.recycle(); 170 } 171 172 } 173 | Popular Tags |