01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.xml;
18:
19: import org.xml.sax.SAXException;
20: import org.xml.sax.ext.LexicalHandler;
21:
22: /**
23: * Default implementation of SAX's <code>LexicalHandler</code> interface. Empty implementation
24: * of all methods so that you only have to redefine the ones of interest.
25: *
26: * @version $Id: DefaultLexicalHandler.java 433543 2006-08-22 06:22:54Z crossley $
27: */
28: public class DefaultLexicalHandler implements LexicalHandler {
29:
30: /**
31: * Shared instance that can be used when lexical events should be ignored.
32: */
33: public static final LexicalHandler NULL_HANDLER = new DefaultLexicalHandler();
34:
35: public void startDTD(String name, String publicId, String systemId)
36: throws SAXException {
37: // nothing
38: }
39:
40: public void endDTD() throws SAXException {
41: // nothing
42: }
43:
44: public void startEntity(String name) throws SAXException {
45: // nothing
46: }
47:
48: public void endEntity(String name) throws SAXException {
49: // nothing
50: }
51:
52: public void startCDATA() throws SAXException {
53: // nothing
54: }
55:
56: public void endCDATA() throws SAXException {
57: // nothing
58: }
59:
60: public void comment(char[] ch, int start, int length)
61: throws SAXException {
62: // nothing
63: }
64: }
|