001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.cocoon.taglib;
018:
019: import org.apache.cocoon.xml.XMLConsumer;
020:
021: import org.xml.sax.Attributes;
022: import org.xml.sax.Locator;
023: import org.xml.sax.SAXException;
024:
025: /**
026: * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
027: * @version CVS $Id: TransformerTagSupport.java 433543 2006-08-22 06:22:54Z crossley $
028: */
029: public class TransformerTagSupport extends TagSupport implements
030: TransformerTag {
031: protected XMLConsumer xmlConsumer;
032:
033: /*
034: * @see ContentHandler#setDocumentLocator(Locator)
035: */
036: public void setDocumentLocator(Locator locator) {
037: xmlConsumer.setDocumentLocator(locator);
038: }
039:
040: /*
041: * @see ContentHandler#startDocument()
042: */
043: public void startDocument() throws SAXException {
044: // nothing to do here
045: }
046:
047: /*
048: * @see ContentHandler#endDocument()
049: */
050: public void endDocument() throws SAXException {
051: // nothing to do here
052: }
053:
054: /*
055: * @see ContentHandler#startPrefixMapping(String, String)
056: */
057: public void startPrefixMapping(String prefix, String uri)
058: throws SAXException {
059: xmlConsumer.startPrefixMapping(prefix, uri);
060: }
061:
062: /*
063: * @see ContentHandler#endPrefixMapping(String)
064: */
065: public void endPrefixMapping(String prefix) throws SAXException {
066: xmlConsumer.endPrefixMapping(prefix);
067: }
068:
069: /*
070: * @see ContentHandler#startElement(String, String, String, Attributes)
071: */
072: public void startElement(String namespaceURI, String localName,
073: String qName, Attributes atts) throws SAXException {
074: xmlConsumer.startElement(namespaceURI, localName, qName, atts);
075: }
076:
077: /*
078: * @see ContentHandler#endElement(String, String, String)
079: */
080: public void endElement(String namespaceURI, String localName,
081: String qName) throws SAXException {
082: xmlConsumer.endElement(namespaceURI, localName, qName);
083: }
084:
085: /*
086: * @see ContentHandler#characters(char[], int, int)
087: */
088: public void characters(char[] ch, int start, int length)
089: throws SAXException {
090: xmlConsumer.characters(ch, start, length);
091: }
092:
093: /*
094: * @see ContentHandler#ignorableWhitespace(char[], int, int)
095: */
096: public void ignorableWhitespace(char[] ch, int start, int length)
097: throws SAXException {
098: xmlConsumer.ignorableWhitespace(ch, start, length);
099: }
100:
101: /*
102: * @see ContentHandler#processingInstruction(String, String)
103: */
104: public void processingInstruction(String target, String data)
105: throws SAXException {
106: xmlConsumer.processingInstruction(target, data);
107: }
108:
109: /*
110: * @see ContentHandler#skippedEntity(String)
111: */
112: public void skippedEntity(String name) throws SAXException {
113: xmlConsumer.skippedEntity(name);
114: }
115:
116: /*
117: * @see LexicalHandler#startDTD(String, String, String)
118: */
119: public void startDTD(String name, String publicId, String systemId)
120: throws SAXException {
121: xmlConsumer.startDTD(name, publicId, systemId);
122: }
123:
124: /*
125: * @see LexicalHandler#endDTD()
126: */
127: public void endDTD() throws SAXException {
128: xmlConsumer.endDTD();
129: }
130:
131: /*
132: * @see LexicalHandler#startEntity(String)
133: */
134: public void startEntity(String name) throws SAXException {
135: xmlConsumer.startEntity(name);
136: }
137:
138: /*
139: * @see LexicalHandler#endEntity(String)
140: */
141: public void endEntity(String name) throws SAXException {
142: xmlConsumer.endEntity(name);
143: }
144:
145: /*
146: * @see LexicalHandler#startCDATA()
147: */
148: public void startCDATA() throws SAXException {
149: xmlConsumer.startCDATA();
150: }
151:
152: /*
153: * @see LexicalHandler#endCDATA()
154: */
155: public void endCDATA() throws SAXException {
156: xmlConsumer.endCDATA();
157: }
158:
159: /*
160: * @see LexicalHandler#comment(char[], int, int)
161: */
162: public void comment(char[] ch, int start, int length)
163: throws SAXException {
164: xmlConsumer.comment(ch, start, length);
165: }
166:
167: /*
168: * @see XMLProducer#setConsumer(XMLConsumer)
169: */
170: public void setConsumer(XMLConsumer consumer) {
171: this .xmlConsumer = consumer;
172: }
173:
174: /*
175: * @see Recyclable#recycle()
176: */
177: public void recycle() {
178: this.xmlConsumer = null;
179: super.recycle();
180: }
181:
182: }
|