You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2005/07/28 18:01:24 UTC

svn commit: r225806 - /cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java

Author: sylvain
Date: Thu Jul 28 09:01:18 2005
New Revision: 225806

URL: http://svn.apache.org/viewcvs?rev=225806&view=rev
Log:
Fix bug #35913

Added:
    cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java   (with props)

Added: cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java?rev=225806&view=auto
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java (added)
+++ cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java Thu Jul 28 09:01:18 2005
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.xml;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * Default implementation of SAX's <code>LexicalHandler</code> interface. Empty implementation
+ * of all methods so that you only have to redefine the ones of interest.
+ *
+ * @version $Id$
+ */
+public class DefaultLexicalHandler implements LexicalHandler {
+    
+    /**
+     * Shared instance that can be used when lexical events should be ignored.
+     */
+    public static final LexicalHandler NULL_HANDLER = new DefaultLexicalHandler();
+
+    public void startDTD(String name, String publicId, String systemId) throws SAXException {
+        // nothing
+    }
+
+    public void endDTD() throws SAXException {
+        // nothing
+    }
+
+    public void startEntity(String name) throws SAXException {
+        // nothing
+    }
+
+    public void endEntity(String name) throws SAXException {
+        // nothing
+    }
+
+    public void startCDATA() throws SAXException {
+        // nothing
+    }
+
+    public void endCDATA() throws SAXException {
+        // nothing
+    }
+
+    public void comment(char[] ch, int start, int length) throws SAXException {
+        // nothing
+    }
+}
\ No newline at end of file

Propchange: cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/java/org/apache/cocoon/xml/DefaultLexicalHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id