cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/serializers XercesSerializer.java
Date Wed, 09 Feb 2000 01:53:21 GMT
pier        00/02/08 17:53:21

  Modified:    src/org/apache/cocoon/serializers Tag: xml-cocoon2-alpha0
                        XercesSerializer.java
  Added:       src/org/apache/cocoon Tag: xml-cocoon2-alpha0
                        XMLConsumerImpl.java
  Log:
  Moved the XMLConsumer nested into XercesSerializer in a stand-alone generic class
  since its use might be shared by different filters/serializers.
  NOTE: All the SAX transport mechanism need to be revised in light of SAX version 2.0
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +110 -0    xml-cocoon/src/org/apache/cocoon/Attic/XMLConsumerImpl.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +3 -79     xml-cocoon/src/org/apache/cocoon/serializers/Attic/XercesSerializer.java
  
  Index: XercesSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serializers/Attic/XercesSerializer.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XercesSerializer.java	2000/02/07 15:35:41	1.1.2.1
  +++ XercesSerializer.java	2000/02/09 01:53:21	1.1.2.2
  @@ -11,6 +11,7 @@
   import java.io.OutputStream;
   import org.apache.cocoon.Job;
   import org.apache.cocoon.XMLConsumer;
  +import org.apache.cocoon.XMLConsumerImpl;
   import org.apache.cocoon.framework.AbstractComponent;
   import org.apache.cocoon.framework.Configurations;
   import org.apache.cocoon.framework.ConfigurationException;
  @@ -28,7 +29,7 @@
    *         Exoffice Technologies, INC.</a>
    * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
    *         Software Foundation</a>. All rights reserved.
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/02/07 15:35:41 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/09 01:53:21 $
    */
   public class XercesSerializer extends AbstractComponent implements Serializer {
       /** The Xerces serializer factory */
  @@ -48,7 +49,7 @@
           job.setContentType(this.contentType);
           OutputFormat fmt=new OutputFormat();
           DocumentHandler h=fac.makeSerializer(out,fmt).asDocumentHandler();
  -        return(Consumer.create(h));
  +        return(new XMLConsumerImpl(h));
       }
   
       public void configure(Configurations conf)
  @@ -76,81 +77,4 @@
       public boolean modifiedSince(long date) {
           return(false);
       }
  -    
  -    private static class Consumer implements XMLConsumer {
  -        DocumentHandler handler=null;
  -
  -        private Consumer() {
  -            super();
  -        }
  -
  -        private static Consumer create(DocumentHandler h) {
  -            Consumer c=new Consumer();
  -            c.handler=h;
  -            return(c);
  -        }
  -
  -        /**
  -         * Receive notification of a processing instruction. 
  -         */
  -        public void processingInstruction(String target, String data)
  -        throws SAXException {
  -            this.handler.processingInstruction(target,data);
  -        }
  -    
  -        /**
  -         * Receive notification of the beginning of an element. 
  -         */
  -        public void startElement(String name, AttributeList atts)
  -        throws SAXException {
  -            this.handler.startElement(name,atts);
  -        }
  -    
  -        /**
  -         * Receive notification of the end of an element. 
  -         */
  -        public void endElement(String name)
  -        throws SAXException {
  -            this.handler.endElement(name);
  -        }
  -    
  -        /**
  -         * Receive notification of the beginning of a document. 
  -         */
  -        public void startDocument()
  -        throws SAXException {
  -            this.handler.startDocument();
  -        }
  -    
  -        /**
  -         * Receive notification of the end of a document. 
  -         */
  -        public void endDocument()
  -        throws SAXException {
  -            this.handler.endDocument();
  -        }
  -    
  -        /**
  -         * Receive notification of character data.
  -         */
  -        public void characters(char[] ch, int start, int len)
  -        throws SAXException {
  -            this.handler.characters(ch,start,len);
  -        }
  -    
  -        /**
  -         * Receive notification of ignorable whitespace in element content. 
  -         */
  -        public void ignorableWhitespace(char[] ch, int start, int len)
  -        throws SAXException {
  -            this.handler.ignorableWhitespace(ch,start,len);
  -        }
  -    
  -        /**
  -         * Receive an object for locating the origin of SAX document events. 
  -         */
  -        public void setDocumentLocator(Locator locator) {
  -            this.handler.setDocumentLocator(locator);
  -        }
  -    }        
   }
  
  
  

Mime
View raw message