avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/xmlutil/src/test/org/apache/excalibur/xml/dom/test DefaultDOMHandlerFactoryTestCase.java DefaultDOMHandlerFactoryTestCase.xtest
Date Wed, 22 Jan 2003 02:31:28 GMT
jefft       2003/01/21 18:31:27

  Modified:    xmlutil/src/java/org/apache/excalibur/xml/impl
                        JaxpParser.java XercesParser.java
               xmlutil/src/java/org/apache/excalibur/xml/sax
                        JTidyHTMLParser.java
               xmlutil/src/java/org/apache/excalibur/xmlizer
                        DefaultXMLizer.java
               xmlutil/src/test/org/apache/excalibur/xml/dom/test
                        DefaultDOMHandlerFactoryTestCase.java
                        DefaultDOMHandlerFactoryTestCase.xtest
  Added:       xmlutil/src/java/org/apache/excalibur/xml/sax SAXParser.java
  Removed:     xmlutil/src/java/org/apache/excalibur/xml/sax Parser.java
  Log:
  Rename o.a.e.sax.Parser to SAXParser, for consistency with o.a.e.dom.DOMParser
  
  Revision  Changes    Path
  1.2       +3 -3      jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/impl/JaxpParser.java
  
  Index: JaxpParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/impl/JaxpParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JaxpParser.java	15 Jan 2003 08:35:55 -0000	1.1
  +++ JaxpParser.java	22 Jan 2003 02:31:26 -0000	1.2
  @@ -16,7 +16,7 @@
   import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.excalibur.xml.EntityResolver;
   import org.apache.excalibur.xml.dom.DOMParser;
  -import org.apache.excalibur.xml.sax.Parser;
  +import org.apache.excalibur.xml.sax.SAXParser;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.ParameterException;
  @@ -75,7 +75,7 @@
    */
   public final class JaxpParser
       extends AbstractLogEnabled
  -    implements Parser, DOMParser, 
  +    implements SAXParser, DOMParser, 
                   Poolable, Component, Parameterizable, Serviceable, ErrorHandler
   {
       /** the SAX Parser factory */
  
  
  
  1.2       +4 -3      jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/impl/XercesParser.java
  
  Index: XercesParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/impl/XercesParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XercesParser.java	15 Jan 2003 08:35:55 -0000	1.1
  +++ XercesParser.java	22 Jan 2003 02:31:26 -0000	1.2
  @@ -11,7 +11,8 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.thread.ThreadSafe;
  -import org.apache.excalibur.xml.sax.Parser;
  +// Note: in this class, 'SAXParser' refers to the Xerces class
  +//import org.apache.excalibur.xml.sax.SAXParser;
   import org.apache.xerces.dom.DocumentImpl;
   import org.apache.xerces.parsers.DOMParser;
   import org.apache.xerces.parsers.SAXParser;
  @@ -30,7 +31,7 @@
    */
   public final class XercesParser
       extends AbstractLogEnabled
  -    implements Parser, org.apache.excalibur.xml.dom.DOMParser,
  +    implements org.apache.excalibur.xml.sax.SAXParser, org.apache.excalibur.xml.dom.DOMParser,
                   ErrorHandler, ThreadSafe, Initializable
   {
       public void initialize()
  
  
  
  1.4       +3 -3      jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/JTidyHTMLParser.java
  
  Index: JTidyHTMLParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/JTidyHTMLParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JTidyHTMLParser.java	14 Jan 2003 08:52:48 -0000	1.3
  +++ JTidyHTMLParser.java	22 Jan 2003 02:31:27 -0000	1.4
  @@ -19,7 +19,7 @@
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.avalon.framework.component.Component;
   import org.apache.excalibur.xml.dom.DOMSerializer;
  -import org.apache.excalibur.xml.sax.Parser;
  +import org.apache.excalibur.xml.sax.SAXParser;
   import org.w3c.dom.Document;
   import org.w3c.tidy.Tidy;
   import org.xml.sax.ContentHandler;
  @@ -37,7 +37,7 @@
    * @version CVS $Revision$ $Date$
    */
   public final class JTidyHTMLParser extends AbstractLogEnabled
  -        implements Parser, Serviceable, Configurable, Initializable, ThreadSafe, Component
  +        implements SAXParser, Serviceable, Configurable, Initializable, ThreadSafe, Component
   {
       private DOMSerializer m_serializer;
       private Tidy m_tidy;
  
  
  
  1.1                  jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/sax/SAXParser.java
  
  Index: SAXParser.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.excalibur.xml.sax;
  
  import java.io.IOException;
  import org.xml.sax.ContentHandler;
  import org.xml.sax.InputSource;
  import org.xml.sax.SAXException;
  import org.xml.sax.ext.LexicalHandler;
  
  /**
   * The parser can be used to parse any XML document given
   * by a {@link InputSource} object.
   * It can either send XML events or create a DOM from
   * the parsed document.
   *
   * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
   * @version CVS $Revision: 1.1 $ $Date: 2003/01/22 02:31:27 $
   */
  public interface SAXParser
  {
      String ROLE = SAXParser.class.getName();
  
      /**
       * Parse the {@link InputSource} and send
       * SAX events to the consumer.
       * Attention: the consumer can  implement the
       * {@link LexicalHandler} as well.
       * The parse should take care of this.
       */
      void parse( InputSource in, ContentHandler consumer )
          throws SAXException, IOException;
  
      /**
       * Parse the {@link InputSource} and send
       * SAX events to the content handler and
       * the lexical handler.
       */
      void parse( InputSource in,
                  ContentHandler contentHandler,
                  LexicalHandler lexicalHandler )
          throws SAXException, IOException;
  }
  
  
  
  1.6       +5 -5      jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xmlizer/DefaultXMLizer.java
  
  Index: DefaultXMLizer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xmlizer/DefaultXMLizer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultXMLizer.java	15 Jan 2003 10:37:34 -0000	1.5
  +++ DefaultXMLizer.java	22 Jan 2003 02:31:27 -0000	1.6
  @@ -16,7 +16,7 @@
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
  -import org.apache.excalibur.xml.sax.Parser;
  +import org.apache.excalibur.xml.sax.SAXParser;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
  @@ -63,7 +63,7 @@
           }
           if ( getLogger().isDebugEnabled() )
           {
  -            getLogger().debug("XMLizer: Default parser is '"+Parser.ROLE+"'.");
  +            getLogger().debug("XMLizer: Default parser is '"+SAXParser.ROLE+"'.");
           }
       }
   
  @@ -101,12 +101,12 @@
                           ", guessing text/xml";
                   getLogger().debug( message );
               }
  -            parserRole = Parser.ROLE;
  +            parserRole = SAXParser.ROLE;
           }
   
           try
           {
  -            final Parser parser = (Parser) m_serviceManager.lookup( parserRole );
  +            final SAXParser parser = (SAXParser) m_serviceManager.lookup( parserRole );
   
               final InputSource inputSource = new InputSource( stream );
               inputSource.setSystemId( systemID );
  
  
  
  1.3       +2 -2      jakarta-avalon-excalibur/xmlutil/src/test/org/apache/excalibur/xml/dom/test/DefaultDOMHandlerFactoryTestCase.java
  
  Index: DefaultDOMHandlerFactoryTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/test/org/apache/excalibur/xml/dom/test/DefaultDOMHandlerFactoryTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultDOMHandlerFactoryTestCase.java	22 Jan 2003 02:13:44 -0000	1.2
  +++ DefaultDOMHandlerFactoryTestCase.java	22 Jan 2003 02:31:27 -0000	1.3
  @@ -7,7 +7,7 @@
   import org.xml.sax.InputSource;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
  -import org.apache.excalibur.xml.sax.Parser;
  +import org.apache.excalibur.xml.sax.SAXParser;
   import org.apache.excalibur.xml.dom.DOMHandler;
   import org.apache.excalibur.xml.dom.DOMHandlerFactory;
   
  @@ -31,7 +31,7 @@
       {
           try 
           {
  -            final Parser parser = (Parser)manager.lookup( Parser.ROLE );
  +            final SAXParser parser = (SAXParser)manager.lookup( SAXParser.ROLE );
               final DOMHandlerFactory handlerFactory = (DOMHandlerFactory)manager.lookup(
DOMHandlerFactory.ROLE );        
   
               final DOMHandler handler = handlerFactory.createDOMHandler();
  
  
  
  1.4       +1 -1      jakarta-avalon-excalibur/xmlutil/src/test/org/apache/excalibur/xml/dom/test/DefaultDOMHandlerFactoryTestCase.xtest
  
  Index: DefaultDOMHandlerFactoryTestCase.xtest
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/test/org/apache/excalibur/xml/dom/test/DefaultDOMHandlerFactoryTestCase.xtest,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultDOMHandlerFactoryTestCase.xtest	22 Jan 2003 02:13:44 -0000	1.3
  +++ DefaultDOMHandlerFactoryTestCase.xtest	22 Jan 2003 02:31:27 -0000	1.4
  @@ -25,7 +25,7 @@
   	</logkit>
   	<roles>
   		<role name="org.apache.excalibur.xml.dom.DOMHandlerFactory" shorthand="domhandler-factory"
default-class="org.apache.excalibur.xml.dom.DefaultDOMHandlerFactory"/>
  -		<role name="org.apache.excalibur.xml.sax.Parser" shorthand="parser" default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
  +		<role name="org.apache.excalibur.xml.sax.SAXParser" shorthand="parser" default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
   	</roles>
   	<components>
   		<parser logger="test">
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message