cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/xml XMLCompiler.java XMLMulticaster.java
Date Wed, 11 Apr 2001 12:41:34 GMT
donaldp     01/04/11 05:41:33

  Modified:    lib      Tag: xml-cocoon2 avalonapi.jar
               src/org/apache/cocoon/acting Tag: xml-cocoon2
                        AbstractDatabaseAction.java ComposerAction.java
                        DatabaseAddAction.java DatabaseDeleteAction.java
                        DatabaseUpdateAction.java
               src/org/apache/cocoon/components/language/generator Tag:
                        xml-cocoon2 GeneratorSelector.java
                        ProgramGeneratorImpl.java
               src/org/apache/cocoon/components/pipeline Tag: xml-cocoon2
                        NonCachingEventPipeline.java
                        NonCachingStreamPipeline.java
               src/org/apache/cocoon/generation Tag: xml-cocoon2
                        FileGenerator.java
               src/org/apache/cocoon/serialization Tag: xml-cocoon2
                        SVGSerializer.java
               src/org/apache/cocoon/servlet Tag: xml-cocoon2
                        CocoonServlet.java
               src/org/apache/cocoon/sitemap Tag: xml-cocoon2
                        AbstractSitemap.java SitemapComponentSelector.java
               src/org/apache/cocoon/xml Tag: xml-cocoon2 XMLCompiler.java
                        XMLMulticaster.java
  Log:
  Update to work against latest avalon.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.40  +637 -649  xml-cocoon/lib/Attic/avalonapi.jar
  
  	<<Binary file>>
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.25  +2 -1      xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractDatabaseAction.java
  
  Index: AbstractDatabaseAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractDatabaseAction.java,v
  retrieving revision 1.1.2.24
  retrieving revision 1.1.2.25
  diff -u -r1.1.2.24 -r1.1.2.25
  --- AbstractDatabaseAction.java	2001/03/30 17:14:08	1.1.2.24
  +++ AbstractDatabaseAction.java	2001/04/11 12:41:11	1.1.2.25
  @@ -40,6 +40,7 @@
   import org.apache.avalon.ComponentManager;
   import org.apache.avalon.ComponentSelector;
   import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
  @@ -174,7 +175,7 @@
    * </table>
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.24 $ $Date: 2001/03/30 17:14:08 $
  + * @version CVS $Revision: 1.1.2.25 $ $Date: 2001/04/11 12:41:11 $
    */
   public abstract class AbstractDatabaseAction extends AbstractComplimentaryConfigurableAction implements Configurable {
       protected Map files = new HashMap();
  
  
  
  1.1.2.5   +2 -2      xml-cocoon/src/org/apache/cocoon/acting/Attic/ComposerAction.java
  
  Index: ComposerAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/ComposerAction.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- ComposerAction.java	2001/02/27 16:49:14	1.1.2.4
  +++ ComposerAction.java	2001/04/11 12:41:12	1.1.2.5
  @@ -7,9 +7,9 @@
    *****************************************************************************/
   package org.apache.cocoon.acting;
   
  -import org.apache.avalon.Composer;
   import org.apache.avalon.ComponentManager;
   import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.Composer;
   import org.apache.cocoon.Cocoon;
   
   /**
  @@ -17,7 +17,7 @@
    * that extends this to access SitemapComponents.
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.4 $ $Date: 2001/02/27 16:49:14 $
  + * @version CVS $Revision: 1.1.2.5 $ $Date: 2001/04/11 12:41:12 $
    */
   public abstract class ComposerAction extends AbstractAction implements Composer {
   
  
  
  
  1.1.2.21  +2 -2      xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAddAction.java
  
  Index: DatabaseAddAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAddAction.java,v
  retrieving revision 1.1.2.20
  retrieving revision 1.1.2.21
  diff -u -r1.1.2.20 -r1.1.2.21
  --- DatabaseAddAction.java	2001/03/30 17:14:09	1.1.2.20
  +++ DatabaseAddAction.java	2001/04/11 12:41:12	1.1.2.21
  @@ -22,7 +22,7 @@
   
   import org.apache.avalon.Component;
   import org.apache.avalon.ComponentSelector;
  -import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
  @@ -40,7 +40,7 @@
    * only one table at a time to update.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.20 $ $Date: 2001/03/30 17:14:09 $
  + * @version CVS $Revision: 1.1.2.21 $ $Date: 2001/04/11 12:41:12 $
    */
   public class DatabaseAddAction extends AbstractDatabaseAction {
       protected static final Map addStatements = new HashMap();
  
  
  
  1.1.2.12  +2 -2      xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseDeleteAction.java
  
  Index: DatabaseDeleteAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseDeleteAction.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- DatabaseDeleteAction.java	2001/03/30 17:14:09	1.1.2.11
  +++ DatabaseDeleteAction.java	2001/04/11 12:41:13	1.1.2.12
  @@ -22,7 +22,7 @@
   
   import org.apache.avalon.Component;
   import org.apache.avalon.ComponentSelector;
  -import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
  @@ -43,7 +43,7 @@
    * the keys.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/03/30 17:14:09 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/04/11 12:41:13 $
    */
   public final class DatabaseDeleteAction extends AbstractDatabaseAction {
       private static final Map deleteStatements = new HashMap();
  
  
  
  1.1.2.17  +2 -2      xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseUpdateAction.java
  
  Index: DatabaseUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseUpdateAction.java,v
  retrieving revision 1.1.2.16
  retrieving revision 1.1.2.17
  diff -u -r1.1.2.16 -r1.1.2.17
  --- DatabaseUpdateAction.java	2001/03/30 17:14:10	1.1.2.16
  +++ DatabaseUpdateAction.java	2001/04/11 12:41:14	1.1.2.17
  @@ -22,7 +22,7 @@
   
   import org.apache.avalon.Component;
   import org.apache.avalon.ComponentSelector;
  -import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
  @@ -40,7 +40,7 @@
    * only one table at a time to update.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.16 $ $Date: 2001/03/30 17:14:10 $
  + * @version CVS $Revision: 1.1.2.17 $ $Date: 2001/04/11 12:41:14 $
    */
   public class DatabaseUpdateAction extends AbstractDatabaseAction {
       private static final Map updateStatements = new HashMap();
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.9   +8 -7      xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/GeneratorSelector.java
  
  Index: GeneratorSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/GeneratorSelector.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- GeneratorSelector.java	2001/04/05 20:15:33	1.1.2.8
  +++ GeneratorSelector.java	2001/04/11 12:41:18	1.1.2.9
  @@ -12,6 +12,7 @@
   import org.apache.avalon.Component;
   import org.apache.avalon.ComponentManager;
   import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.DefaultConfiguration;
   
   import org.apache.cocoon.components.classloader.ClassLoaderManager;
  @@ -25,7 +26,7 @@
    * includes Sitemaps and XSP Pages
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/04/05 20:15:33 $
  + * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/04/11 12:41:18 $
    */
   public class GeneratorSelector extends DefaultComponentSelector {
       private ClassLoaderManager classManager;
  @@ -36,13 +37,13 @@
           this.classManager = (ClassLoaderManager) manager.lookup(Roles.CLASS_LOADER);
   
           try {
  -            this.classManager.addDirectory((File) this.context.get(Constants.CONTEXT_WORK_DIR));
  +            this.classManager.addDirectory((File) this.m_context.get(Constants.CONTEXT_WORK_DIR));
           } catch (Exception e) {
  -            throw new ComponentManagerException("Could not add repository to ClassLoaderManager", e);
  +            throw new ComponentException("Could not add repository to ClassLoaderManager", e);
           }
       }
   
  -    public Component select(Object hint) throws ComponentManagerException {
  +    public Component select(Object hint) throws ComponentException {
           try {
               return super.select(hint);
           } catch (Exception e) {
  @@ -52,19 +53,19 @@
           }
       }
   
  -    private void addGenerator(Object hint) throws ComponentManagerException {
  +    private void addGenerator(Object hint) throws ComponentException {
           Class generator;
           String className = hint.toString().replace(File.separatorChar, '.');
           try {
               generator = this.classManager.loadClass(className);
           } catch (Exception e) {
  -            throw new ComponentManagerException("Could not add component for class: " + className, e);
  +            throw new ComponentException("Could not add component for class: " + className, e);
           }
   
           this.addGenerator(hint, generator);
       }
   
  -    public void addGenerator(Object hint, Class generator) throws ComponentManagerException {
  +    public void addGenerator(Object hint, Class generator) throws ComponentException {
           super.addComponent(hint, generator, new DefaultConfiguration("", "GeneratorSelector"));
       }
   }
  
  
  
  1.1.2.44  +25 -25    xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java
  
  Index: ProgramGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java,v
  retrieving revision 1.1.2.43
  retrieving revision 1.1.2.44
  diff -u -r1.1.2.43 -r1.1.2.44
  --- ProgramGeneratorImpl.java	2001/03/19 21:20:21	1.1.2.43
  +++ ProgramGeneratorImpl.java	2001/04/11 12:41:19	1.1.2.44
  @@ -9,44 +9,44 @@
   package org.apache.cocoon.components.language.generator;
   
   import java.io.File;
  +import java.io.FileNotFoundException;
   import java.io.FileReader;
   import java.io.IOException;
  -import java.io.FileNotFoundException;
  -import org.apache.log.Logger;
  -import org.apache.avalon.Loggable;
   import org.apache.avalon.AbstractLoggable;
  -import org.apache.avalon.Modifiable;
   import org.apache.avalon.Component;
  -import org.apache.avalon.Composer;
   import org.apache.avalon.ComponentManager;
  -import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.ComponentSelector;
  +import org.apache.avalon.Composer;
   import org.apache.avalon.Context;
   import org.apache.avalon.Contextualizable;
  +import org.apache.avalon.Loggable;
  +import org.apache.avalon.Modifiable;
  +import org.apache.avalon.ThreadSafe;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
  -import org.apache.avalon.ComponentSelector;
  -import org.apache.avalon.ThreadSafe;
   import org.apache.avalon.configuration.Parameters;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.Roles;
  -import org.apache.cocoon.components.store.Store;
   import org.apache.cocoon.components.language.LanguageException;
  -import org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage;
   import org.apache.cocoon.components.language.markup.MarkupLanguage;
  +import org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage;
   import org.apache.cocoon.components.language.programming.CodeFormatter;
   import org.apache.cocoon.components.language.programming.ProgrammingLanguage;
  +import org.apache.cocoon.components.store.Store;
   import org.apache.cocoon.util.IOUtils;
  +import org.apache.log.Logger;
   import org.w3c.dom.Document;
   import org.w3c.dom.Document;
  -import org.xml.sax.InputSource;
   import org.xml.sax.EntityResolver;
  +import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
   
   /**
    * The default implementation of <code>ProgramGenerator</code>
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.43 $ $Date: 2001/03/19 21:20:21 $
  + * @version CVS $Revision: 1.1.2.44 $ $Date: 2001/04/11 12:41:19 $
    */
   public class ProgramGeneratorImpl extends AbstractLoggable implements ProgramGenerator, Contextualizable, Composer, Configurable, ThreadSafe {
   
  @@ -84,10 +84,10 @@
   
       /** Contextualize this class */
       public void contextualize(Context context) {
  -       if (this.workDir == null) {
  -           this.workDir = (File) context.get(Constants.CONTEXT_WORK_DIR);
  -           this.rootPath = (String) context.get(Constants.CONTEXT_ROOT_PATH);
  -       }
  +        if (this.workDir == null) {
  +            this.workDir = (File) context.get(Constants.CONTEXT_WORK_DIR);
  +            this.rootPath = (String) context.get(Constants.CONTEXT_ROOT_PATH);
  +        }
       }
   
       /**
  @@ -95,7 +95,7 @@
        * <code>ComponentSelector</code> used as language factory for both markup and programming languages.
        * @param manager The global component manager
        */
  -    public void compose(ComponentManager manager) throws ComponentManagerException {
  +    public void compose(ComponentManager manager) throws ComponentException {
           if ((this.manager == null) && (manager != null)) {
               this.manager = manager;
               try {
  @@ -132,7 +132,7 @@
                                     String markupLanguageName,
                                     String programmingLanguageName,
                                     EntityResolver resolver)
  -    throws Exception {
  +        throws Exception {
   
           // Create filesystem store
           // Set filenames
  @@ -223,15 +223,15 @@
       }
   
       private Class generateResource(File file,
  -                                  String normalizedName,
  -                                  MarkupLanguage markupLanguage,
  -                                  ProgrammingLanguage programmingLanguage,
  -                                  EntityResolver resolver)
  -    throws Exception {
  +                                   String normalizedName,
  +                                   MarkupLanguage markupLanguage,
  +                                   ProgrammingLanguage programmingLanguage,
  +                                   EntityResolver resolver)
  +        throws Exception {
           // Generate code
           String code = markupLanguage.generateCode(
  -            new InputSource(
  -            new FileReader(file)), normalizedName, programmingLanguage, resolver);
  +                                                  new InputSource(
  +                                                                  new FileReader(file)), normalizedName, programmingLanguage, resolver);
           String encoding = markupLanguage.getEncoding();
           // Format source code if applicable
           CodeFormatter codeFormatter = programmingLanguage.getCodeFormatter();
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +2 -2      xml-cocoon/src/org/apache/cocoon/components/pipeline/Attic/NonCachingEventPipeline.java
  
  Index: NonCachingEventPipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/pipeline/Attic/NonCachingEventPipeline.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- NonCachingEventPipeline.java	2001/04/11 10:52:34	1.1.2.3
  +++ NonCachingEventPipeline.java	2001/04/11 12:41:21	1.1.2.4
  @@ -12,7 +12,7 @@
   import java.io.IOException;
   
   import org.apache.avalon.ComponentManager;
  -import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.ComponentSelector;
   import org.apache.avalon.Component;
   import org.apache.avalon.Composer;
  @@ -36,7 +36,7 @@
   
   /**
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.3 $ $Date: 2001/04/11 10:52:34 $
  + * @version CVS $Revision: 1.1.2.4 $ $Date: 2001/04/11 12:41:21 $
    */
   public class NonCachingEventPipeline extends AbstractEventPipeline {
   
  
  
  
  1.1.2.2   +4 -4      xml-cocoon/src/org/apache/cocoon/components/pipeline/Attic/NonCachingStreamPipeline.java
  
  Index: NonCachingStreamPipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/pipeline/Attic/NonCachingStreamPipeline.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- NonCachingStreamPipeline.java	2001/04/04 15:42:43	1.1.2.1
  +++ NonCachingStreamPipeline.java	2001/04/11 12:41:21	1.1.2.2
  @@ -11,7 +11,7 @@
   import java.io.OutputStream;
   
   import org.apache.avalon.ComponentManager;
  -import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.ComponentSelector;
   import org.apache.avalon.Composer;
   import org.apache.avalon.configuration.Parameters;
  @@ -36,7 +36,7 @@
    * resource
    * </UL>
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2001/04/04 15:42:43 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/11 12:41:21 $
    */
   public class NonCachingStreamPipeline extends AbstractLoggable implements StreamPipeline {
       private EventPipeline eventPipeline;
  @@ -62,8 +62,8 @@
        *
        * @param manager The <code>ComponentManager</code> which this
        *               <code>Composer</code> uses.
  -     * @throws ComponentManagerException  */
  -    public void compose (ComponentManager manager) throws ComponentManagerException {
  +     * @throws ComponentException  */
  +    public void compose (ComponentManager manager) throws ComponentException {
           this.manager = manager;
       }
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.27  +2 -3      xml-cocoon/src/org/apache/cocoon/generation/Attic/FileGenerator.java
  
  Index: FileGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/FileGenerator.java,v
  retrieving revision 1.1.2.26
  retrieving revision 1.1.2.27
  diff -u -r1.1.2.26 -r1.1.2.27
  --- FileGenerator.java	2001/04/11 10:52:59	1.1.2.26
  +++ FileGenerator.java	2001/04/11 12:41:23	1.1.2.27
  @@ -29,8 +29,7 @@
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
   import org.apache.avalon.ComponentManager;
  -import org.apache.avalon.ComponentNotFoundException;
  -import org.apache.avalon.ComponentNotAccessibleException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
  @@ -63,7 +62,7 @@
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1.2.26 $ $Date: 2001/04/11 10:52:59 $
  + * @version CVS $Revision: 1.1.2.27 $ $Date: 2001/04/11 12:41:23 $
    */
   public class FileGenerator extends ComposerGenerator
   implements Configurable, Cacheable {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.30  +2 -2      xml-cocoon/src/org/apache/cocoon/serialization/Attic/SVGSerializer.java
  
  Index: SVGSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/SVGSerializer.java,v
  retrieving revision 1.1.2.29
  retrieving revision 1.1.2.30
  diff -u -r1.1.2.29 -r1.1.2.30
  --- SVGSerializer.java	2001/03/12 17:13:04	1.1.2.29
  +++ SVGSerializer.java	2001/04/11 12:41:24	1.1.2.30
  @@ -18,7 +18,7 @@
   import org.apache.avalon.Poolable;
   import org.apache.avalon.Composer;
   import org.apache.avalon.ComponentManager;
  -import org.apache.avalon.ComponentManagerException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
  @@ -38,7 +38,7 @@
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:rossb@apache.org">Ross Burton</a>
  - * @version CVS $Revision: 1.1.2.29 $ $Date: 2001/03/12 17:13:04 $
  + * @version CVS $Revision: 1.1.2.30 $ $Date: 2001/04/11 12:41:24 $
    */
   public class SVGSerializer extends SVGBuilder implements Composer, Serializer, Configurable, Poolable {
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.81  +2 -2      xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java,v
  retrieving revision 1.1.4.80
  retrieving revision 1.1.4.81
  diff -u -r1.1.4.80 -r1.1.4.81
  --- CocoonServlet.java	2001/04/06 14:18:09	1.1.4.80
  +++ CocoonServlet.java	2001/04/11 12:41:26	1.1.4.81
  @@ -30,7 +30,7 @@
   
   import org.xml.sax.SAXException;
   
  -import org.apache.avalon.ComponentNotAccessibleException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.configuration.ConfigurationException;
   import org.apache.avalon.DefaultContext;
   
  @@ -63,7 +63,7 @@
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:nicolaken@supereva.it">Nicola Ken Barozzi</a> Aisa
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.4.80 $ $Date: 2001/04/06 14:18:09 $
  + * @version CVS $Revision: 1.1.4.81 $ $Date: 2001/04/11 12:41:26 $
    */
   
   public class CocoonServlet extends HttpServlet {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.30  +5 -5      xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemap.java
  
  Index: AbstractSitemap.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemap.java,v
  retrieving revision 1.1.2.29
  retrieving revision 1.1.2.30
  diff -u -r1.1.2.29 -r1.1.2.30
  --- AbstractSitemap.java	2001/04/05 20:15:35	1.1.2.29
  +++ AbstractSitemap.java	2001/04/11 12:41:28	1.1.2.30
  @@ -22,8 +22,8 @@
   import org.apache.avalon.Composer;
   import org.apache.avalon.configuration.Configurable;
   import org.apache.avalon.configuration.Configuration;
  -import org.apache.avalon.ComponentManagerException;
  -import org.apache.avalon.ComponentNotFoundException;
  +import org.apache.avalon.component.ComponentException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.AbstractLoggable;
   import org.apache.avalon.component.DefaultComponentSelector;
   
  @@ -41,7 +41,7 @@
    * Base class for generated <code>Sitemap</code> classes
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.29 $ $Date: 2001/04/05 20:15:35 $
  + * @version CVS $Revision: 1.1.2.30 $ $Date: 2001/04/11 12:41:28 $
    */
   public abstract class AbstractSitemap extends AbstractLoggable implements Sitemap {
       private Context context;
  @@ -72,7 +72,7 @@
        * Set the current <code>ComponentManager</code> instance used by this
        * <code>Composer</code>.
        */
  -    public void compose(ComponentManager manager)  throws ComponentManagerException {
  +    public void compose(ComponentManager manager)  throws ComponentException {
           this.manager = manager;
   
           try {
  @@ -86,7 +86,7 @@
               this.selectors = (DefaultComponentSelector) this.manager.lookup(Roles.SELECTORS);
           } catch (Exception e) {
               getLogger().error("cannot obtain the Component", e);
  -            throw new ComponentNotFoundException ("cannot obtain the URLFactory", e);
  +            throw new ComponentException ("cannot obtain the URLFactory", e);
           }
       }
   
  
  
  
  1.1.2.8   +3 -4      xml-cocoon/src/org/apache/cocoon/sitemap/Attic/SitemapComponentSelector.java
  
  Index: SitemapComponentSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/SitemapComponentSelector.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- SitemapComponentSelector.java	2001/04/05 20:15:36	1.1.2.7
  +++ SitemapComponentSelector.java	2001/04/11 12:41:28	1.1.2.8
  @@ -15,8 +15,7 @@
   import org.apache.avalon.configuration.Configuration;
   import org.apache.avalon.configuration.ConfigurationException;
   import org.apache.avalon.Component;
  -import org.apache.avalon.ComponentManagerException;
  -import org.apache.avalon.ComponentNotFoundException;
  +import org.apache.avalon.component.ComponentException;
   import org.apache.avalon.component.DefaultComponentSelector;
   
   import org.apache.cocoon.components.url.URLFactory;
  @@ -24,7 +23,7 @@
   /** Default component manager for Cocoon's sitemap components.
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
  - * @version CVS $Id: SitemapComponentSelector.java,v 1.1.2.7 2001/04/05 20:15:36 bloritsch Exp $
  + * @version CVS $Id: SitemapComponentSelector.java,v 1.1.2.8 2001/04/11 12:41:28 donaldp Exp $
    */
   public class SitemapComponentSelector extends DefaultComponentSelector {
       HashMap mime_types;
  @@ -41,7 +40,7 @@
       }
   
       protected void addSitemapComponent(Object hint, Class component, Configuration conf, String mime_type)
  -    throws ComponentManagerException,
  +    throws ComponentException,
              ConfigurationException {
           super.addComponent(hint, component, conf);
           this.mime_types.put(hint, mime_type);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +189 -191  xml-cocoon/src/org/apache/cocoon/xml/Attic/XMLCompiler.java
  
  Index: XMLCompiler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/xml/Attic/XMLCompiler.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XMLCompiler.java	2001/01/23 17:20:42	1.1.2.1
  +++ XMLCompiler.java	2001/04/11 12:41:31	1.1.2.2
  @@ -1,191 +1,189 @@
  -/**
  - ****************************************************************************
  - * 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 file.                                                         *
  - ****************************************************************************
  - */
  -package org.apache.cocoon.xml;
  -
  -import java.io.*;
  -
  -import org.xml.sax.Attributes;
  -import org.xml.sax.ContentHandler;
  -import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
  -import org.xml.sax.XMLReader;
  -
  -/**
  - * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2001/01/23 17:20:42 $
  - */
  -
  -public final class XMLCompiler implements ContentHandler {
  -
  -    private CompiledXMLOutputStream out;
  -
  -    public void setOutputStream(OutputStream stream) throws IOException {
  -        this.out = new CompiledXMLOutputStream(stream);
  -    }
  -
  -    public static final int START_DOCUMENT         = 0;
  -    public static final int END_DOCUMENT           = 1;
  -    public static final int START_PREFIX_MAPPING   = 2;
  -    public static final int END_PREFIX_MAPPING     = 3;
  -    public static final int START_ELEMENT          = 4;
  -    public static final int END_ELEMENT            = 5;
  -    public static final int CHARACTERS             = 6;
  -    public static final int IGNORABLE_WHITESPACE   = 7;
  -    public static final int PROCESSING_INSTRUCTION = 8;
  -
  -
  -        public void startDocument() throws SAXException {
  -            try {
  -                out.writeEvent(START_DOCUMENT);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void endDocument() throws SAXException {
  -            try {
  -                out.writeEvent(END_DOCUMENT);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException {
  -            try {
  -                out.writeEvent(START_PREFIX_MAPPING);
  -                out.writeString(prefix);
  -                out.writeString(uri);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void endPrefixMapping(java.lang.String prefix) throws SAXException {
  -            try {
  -                out.writeEvent(END_PREFIX_MAPPING);
  -                out.writeString(prefix);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException {
  -            try {
  -                int length = atts.getLength();
  -                out.writeEvent(START_ELEMENT);
  -                out.writeAttributes(length);
  -                for (int i = 0; i < length; i++) {
  -                    out.writeString(atts.getURI(i));
  -                    out.writeString(atts.getLocalName(i));
  -                    out.writeString(atts.getQName(i));
  -                    out.writeString(atts.getType(i));
  -                    out.writeString(atts.getValue(i));
  -                }
  -                out.writeString(namespaceURI);
  -                out.writeString(localName);
  -                out.writeString(qName);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException {
  -            try {
  -                out.writeEvent(END_ELEMENT);
  -                out.writeString(namespaceURI);
  -                out.writeString(localName);
  -                out.writeString(qName);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void characters(char[] ch, int start, int length) throws SAXException {
  -            try {
  -                out.writeEvent(CHARACTERS);
  -                out.writeChars(ch, start, length);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
  -            try {
  -                out.writeEvent(IGNORABLE_WHITESPACE);
  -                out.writeChars(ch, start, length);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException {
  -            try {
  -                out.writeEvent(PROCESSING_INSTRUCTION);
  -                out.writeString(target);
  -                out.writeString(data);
  -            } catch (Exception e) {
  -                throw new SAXException(e);
  -            }
  -        }
  -
  -        public void setDocumentLocator(Locator locator) {
  -            // ignore.
  -        }
  -
  -        public void skippedEntity(java.lang.String name) throws SAXException {
  -            // ignore.
  -        }
  -    }
  -
  -    class ErrorHandler implements org.xml.sax.ErrorHandler {
  -
  -        /** Warning. */
  -        public void warning(SAXParseException ex) {
  -            System.err.println("[Warning] "+
  -                               getLocationString(ex)+": "+
  -                               ex.getMessage());
  -        }
  -
  -        /** Error. */
  -        public void error(SAXParseException ex) {
  -            System.err.println("[Error] "+
  -                               getLocationString(ex)+": "+
  -                               ex.getMessage());
  -        }
  -
  -        /** Fatal error. */
  -        public void fatalError(SAXParseException ex) throws SAXException {
  -            System.err.println("[Fatal Error] "+
  -                               getLocationString(ex)+": "+
  -                               ex.getMessage());
  -        }
  -
  -        /** Returns a string of the location. */
  -        private String getLocationString(SAXParseException ex) {
  -            StringBuffer str = new StringBuffer();
  -
  -            String systemId = ex.getSystemId();
  -            if (systemId != null) {
  -                int index = systemId.lastIndexOf('/');
  -                if (index != -1)
  -                    systemId = systemId.substring(index + 1);
  -                str.append(systemId);
  -            }
  -            str.append(':');
  -            str.append(ex.getLineNumber());
  -            str.append(':');
  -            str.append(ex.getColumnNumber());
  -
  -            return str.toString();
  -        }
  -
  -
  -}
  +/**
  + ****************************************************************************
  + * 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 file.                                                         *
  + ****************************************************************************
  + */
  +package org.apache.cocoon.xml;
  +
  +import java.io.*;
  +
  +import org.xml.sax.Attributes;
  +import org.xml.sax.ContentHandler;
  +import org.xml.sax.Locator;
  +import org.xml.sax.SAXException;
  +import org.xml.sax.SAXParseException;
  +import org.xml.sax.XMLReader;
  +
  +/**
  + * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/11 12:41:31 $
  + */
  +
  +public final class XMLCompiler implements ContentHandler {
  +
  +    private CompiledXMLOutputStream out;
  +
  +    public void setOutputStream(OutputStream stream) throws IOException {
  +        this.out = new CompiledXMLOutputStream(stream);
  +    }
  +
  +    public static final int START_DOCUMENT         = 0;
  +    public static final int END_DOCUMENT           = 1;
  +    public static final int START_PREFIX_MAPPING   = 2;
  +    public static final int END_PREFIX_MAPPING     = 3;
  +    public static final int START_ELEMENT          = 4;
  +    public static final int END_ELEMENT            = 5;
  +    public static final int CHARACTERS             = 6;
  +    public static final int IGNORABLE_WHITESPACE   = 7;
  +    public static final int PROCESSING_INSTRUCTION = 8;
  +
  +
  +        public void startDocument() throws SAXException {
  +            try {
  +                out.writeEvent(START_DOCUMENT);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void endDocument() throws SAXException {
  +            try {
  +                out.writeEvent(END_DOCUMENT);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException {
  +            try {
  +                out.writeEvent(START_PREFIX_MAPPING);
  +                out.writeString(prefix);
  +                out.writeString(uri);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void endPrefixMapping(java.lang.String prefix) throws SAXException {
  +            try {
  +                out.writeEvent(END_PREFIX_MAPPING);
  +                out.writeString(prefix);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException {
  +            try {
  +                int length = atts.getLength();
  +                out.writeEvent(START_ELEMENT);
  +                out.writeAttributes(length);
  +                for (int i = 0; i < length; i++) {
  +                    out.writeString(atts.getURI(i));
  +                    out.writeString(atts.getLocalName(i));
  +                    out.writeString(atts.getQName(i));
  +                    out.writeString(atts.getType(i));
  +                    out.writeString(atts.getValue(i));
  +                }
  +                out.writeString(namespaceURI);
  +                out.writeString(localName);
  +                out.writeString(qName);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException {
  +            try {
  +                out.writeEvent(END_ELEMENT);
  +                out.writeString(namespaceURI);
  +                out.writeString(localName);
  +                out.writeString(qName);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void characters(char[] ch, int start, int length) throws SAXException {
  +            try {
  +                out.writeEvent(CHARACTERS);
  +                out.writeChars(ch, start, length);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
  +            try {
  +                out.writeEvent(IGNORABLE_WHITESPACE);
  +                out.writeChars(ch, start, length);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException {
  +            try {
  +                out.writeEvent(PROCESSING_INSTRUCTION);
  +                out.writeString(target);
  +                out.writeString(data);
  +            } catch (Exception e) {
  +                throw new SAXException(e);
  +            }
  +        }
  +
  +        public void setDocumentLocator(Locator locator) {
  +            // ignore.
  +        }
  +
  +        public void skippedEntity(java.lang.String name) throws SAXException {
  +            // ignore.
  +        }
  +    }
  +
  +    class ErrorHandler implements org.xml.sax.ErrorHandler {
  +
  +        /** Warning. */
  +        public void warning(SAXParseException ex) {
  +            System.err.println("[Warning] "+
  +                               getLocationString(ex)+": "+
  +                               ex.getMessage());
  +        }
  +
  +        /** Error. */
  +        public void error(SAXParseException ex) {
  +            System.err.println("[Error] "+
  +                               getLocationString(ex)+": "+
  +                               ex.getMessage());
  +        }
  +
  +        /** Fatal error. */
  +        public void fatalError(SAXParseException ex) throws SAXException {
  +            System.err.println("[Fatal Error] "+
  +                               getLocationString(ex)+": "+
  +                               ex.getMessage());
  +        }
  +
  +        /** Returns a string of the location. */
  +        private String getLocationString(SAXParseException ex) {
  +            StringBuffer str = new StringBuffer();
  +
  +            String systemId = ex.getSystemId();
  +            if (systemId != null) {
  +                int index = systemId.lastIndexOf('/');
  +                if (index != -1)
  +                    systemId = systemId.substring(index + 1);
  +                str.append(systemId);
  +            }
  +            str.append(':');
  +            str.append(ex.getLineNumber());
  +            str.append(':');
  +            str.append(ex.getColumnNumber());
  +
  +            return str.toString();
  +        }
  +}
  
  
  
  1.1.2.2   +157 -157  xml-cocoon/src/org/apache/cocoon/xml/Attic/XMLMulticaster.java
  
  Index: XMLMulticaster.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/xml/Attic/XMLMulticaster.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XMLMulticaster.java	2001/01/23 17:20:48	1.1.2.1
  +++ XMLMulticaster.java	2001/04/11 12:41:31	1.1.2.2
  @@ -1,157 +1,157 @@
  -/**
  - ****************************************************************************
  - * 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 file.                                                         *
  - ****************************************************************************
  - */
  -package org.apache.cocoon.xml;
  -
  -import org.xml.sax.Attributes;
  -import org.xml.sax.ContentHandler;
  -import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.ext.LexicalHandler;
  -
  -/**
  - * @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2001/01/23 17:20:48 $
  - */
  -
  -public final class XMLMulticaster implements XMLConsumer {
  -
  -    /**
  -     * The XMLMulticaster forwards incomming sax events to a list of
  -     * receiving objects.
  -     */
  -    private ContentHandler[] contentHandlerList;
  -    private LexicalHandler[] lexicalHandlerList;
  -
  -    /**
  -     * Create a new XMLMulticaster with two consumers
  -     */
  -    public XMLMulticaster(XMLConsumer firstConsumer, XMLConsumer secondConsumer) {
  -        this.contentHandlerList = new ContentHandler[] {firstConsumer, secondConsumer};
  -        this.lexicalHandlerList = new LexicalHandler[] {firstConsumer, secondConsumer};
  -    }
  -
  -    /**
  -     * Create a new XMLMulticaster from two contentHandler/lexicalHandler pairs
  -     */
  -    public XMLMulticaster(ContentHandler firstContentHandler,
  -                          LexicalHandler firstLexicalHandler,
  -                          ContentHandler secondContentHandler,
  -                          LexicalHandler secondLexicalHandler) {
  -        this.contentHandlerList = new ContentHandler[] {firstContentHandler, secondContentHandler};
  -        this.lexicalHandlerList = new LexicalHandler[] {firstLexicalHandler, secondLexicalHandler};
  -    }
  -
  -    public XMLMulticaster(ContentHandler[] chList,
  -                          LexicalHandler[] lhList) {
  -        this.contentHandlerList = chList;
  -        this.lexicalHandlerList = lhList;
  -    }
  -
  -    public void startDocument() throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++) {
  -            this.contentHandlerList[i].startDocument();
  -        }
  -    }
  -
  -    public void endDocument() throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++) {
  -                this.contentHandlerList[i].endDocument();
  -        }
  -    }
  -
  -    public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].startPrefixMapping(prefix, uri);
  -    }
  -
  -    public void endPrefixMapping(java.lang.String prefix) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].endPrefixMapping(prefix);
  -    }
  -
  -    public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].startElement(namespaceURI, localName, qName, atts);
  -    }
  -
  -    public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].endElement(namespaceURI, localName, qName);
  -    }
  -
  -    public void characters(char[] ch, int start, int length) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].characters(ch, start, length);
  -    }
  -
  -    public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].ignorableWhitespace(ch, start, length);
  -    }
  -
  -    public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].processingInstruction(target, data);
  -    }
  -
  -    public void setDocumentLocator(Locator locator) {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].setDocumentLocator(locator);
  -    }
  -
  -    public void skippedEntity(java.lang.String name) throws SAXException {
  -        for(int i=0; i<this.contentHandlerList.length; i++)
  -                this.contentHandlerList[i].skippedEntity(name);
  -    }
  -
  -    public void startDTD(String name, String public_id, String system_id)
  -			throws SAXException {
  -        for(int i=0; i<this.lexicalHandlerList.length; i++)
  -            if (this.lexicalHandlerList[i] != null)
  -                this.lexicalHandlerList[i].startDTD(name, public_id, system_id);
  -    }
  -
  -    public void endDTD() throws SAXException {
  -        for(int i=0; i<this.lexicalHandlerList.length; i++)
  -            if (this.lexicalHandlerList[i] != null)
  -                this.lexicalHandlerList[i].endDTD();
  -    }
  -
  -    public void startEntity(String name) throws SAXException {
  -        for(int i=0; i<this.lexicalHandlerList.length; i++)
  -            if (this.lexicalHandlerList[i] != null)
  -                 this.lexicalHandlerList[i].startEntity(name);
  -    }
  -
  -    public void endEntity(String name) throws SAXException {
  -        for(int i=0; i<this.lexicalHandlerList.length; i++)
  -            if (this.lexicalHandlerList[i] != null)
  -                this.lexicalHandlerList[i].endEntity(name);
  -    }
  -
  -    public void startCDATA() throws SAXException {
  -        for(int i=0; i<this.lexicalHandlerList.length; i++)
  -            if (this.lexicalHandlerList[i] != null)
  -                this.lexicalHandlerList[i].startCDATA();
  -    }
  -
  -    public void endCDATA() throws SAXException {
  -        for(int i=0; i<this.lexicalHandlerList.length; i++)
  -            if (this.lexicalHandlerList[i] != null)
  -                this.lexicalHandlerList[i].endCDATA();
  -    }
  -
  -    public void comment(char ary[], int start, int length)
  -			throws SAXException {
  -        for(int i=0; i<this.lexicalHandlerList.length; i++)
  -            if (this.lexicalHandlerList[i] != null)
  -                this.lexicalHandlerList[i].comment(ary, start, length);
  -    }
  -}
  \ No newline at end of file
  +/**
  + ****************************************************************************
  + * 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 file.                                                         *
  + ****************************************************************************
  + */
  +package org.apache.cocoon.xml;
  +
  +import org.xml.sax.Attributes;
  +import org.xml.sax.ContentHandler;
  +import org.xml.sax.Locator;
  +import org.xml.sax.SAXException;
  +import org.xml.sax.ext.LexicalHandler;
  +
  +/**
  + * @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/04/11 12:41:31 $
  + */
  +
  +public final class XMLMulticaster implements XMLConsumer {
  +
  +    /**
  +     * The XMLMulticaster forwards incomming sax events to a list of
  +     * receiving objects.
  +     */
  +    private ContentHandler[] contentHandlerList;
  +    private LexicalHandler[] lexicalHandlerList;
  +
  +    /**
  +     * Create a new XMLMulticaster with two consumers
  +     */
  +    public XMLMulticaster(XMLConsumer firstConsumer, XMLConsumer secondConsumer) {
  +        this.contentHandlerList = new ContentHandler[] {firstConsumer, secondConsumer};
  +        this.lexicalHandlerList = new LexicalHandler[] {firstConsumer, secondConsumer};
  +    }
  +
  +    /**
  +     * Create a new XMLMulticaster from two contentHandler/lexicalHandler pairs
  +     */
  +    public XMLMulticaster(ContentHandler firstContentHandler,
  +                          LexicalHandler firstLexicalHandler,
  +                          ContentHandler secondContentHandler,
  +                          LexicalHandler secondLexicalHandler) {
  +        this.contentHandlerList = new ContentHandler[] {firstContentHandler, secondContentHandler};
  +        this.lexicalHandlerList = new LexicalHandler[] {firstLexicalHandler, secondLexicalHandler};
  +    }
  +
  +    public XMLMulticaster(ContentHandler[] chList,
  +                          LexicalHandler[] lhList) {
  +        this.contentHandlerList = chList;
  +        this.lexicalHandlerList = lhList;
  +    }
  +
  +    public void startDocument() throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++) {
  +            this.contentHandlerList[i].startDocument();
  +        }
  +    }
  +
  +    public void endDocument() throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++) {
  +                this.contentHandlerList[i].endDocument();
  +        }
  +    }
  +
  +    public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].startPrefixMapping(prefix, uri);
  +    }
  +
  +    public void endPrefixMapping(java.lang.String prefix) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].endPrefixMapping(prefix);
  +    }
  +
  +    public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].startElement(namespaceURI, localName, qName, atts);
  +    }
  +
  +    public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].endElement(namespaceURI, localName, qName);
  +    }
  +
  +    public void characters(char[] ch, int start, int length) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].characters(ch, start, length);
  +    }
  +
  +    public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].ignorableWhitespace(ch, start, length);
  +    }
  +
  +    public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].processingInstruction(target, data);
  +    }
  +
  +    public void setDocumentLocator(Locator locator) {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].setDocumentLocator(locator);
  +    }
  +
  +    public void skippedEntity(java.lang.String name) throws SAXException {
  +        for(int i=0; i<this.contentHandlerList.length; i++)
  +                this.contentHandlerList[i].skippedEntity(name);
  +    }
  +
  +    public void startDTD(String name, String public_id, String system_id)
  +			throws SAXException {
  +        for(int i=0; i<this.lexicalHandlerList.length; i++)
  +            if (this.lexicalHandlerList[i] != null)
  +                this.lexicalHandlerList[i].startDTD(name, public_id, system_id);
  +    }
  +
  +    public void endDTD() throws SAXException {
  +        for(int i=0; i<this.lexicalHandlerList.length; i++)
  +            if (this.lexicalHandlerList[i] != null)
  +                this.lexicalHandlerList[i].endDTD();
  +    }
  +
  +    public void startEntity(String name) throws SAXException {
  +        for(int i=0; i<this.lexicalHandlerList.length; i++)
  +            if (this.lexicalHandlerList[i] != null)
  +                 this.lexicalHandlerList[i].startEntity(name);
  +    }
  +
  +    public void endEntity(String name) throws SAXException {
  +        for(int i=0; i<this.lexicalHandlerList.length; i++)
  +            if (this.lexicalHandlerList[i] != null)
  +                this.lexicalHandlerList[i].endEntity(name);
  +    }
  +
  +    public void startCDATA() throws SAXException {
  +        for(int i=0; i<this.lexicalHandlerList.length; i++)
  +            if (this.lexicalHandlerList[i] != null)
  +                this.lexicalHandlerList[i].startCDATA();
  +    }
  +
  +    public void endCDATA() throws SAXException {
  +        for(int i=0; i<this.lexicalHandlerList.length; i++)
  +            if (this.lexicalHandlerList[i] != null)
  +                this.lexicalHandlerList[i].endCDATA();
  +    }
  +
  +    public void comment(char ary[], int start, int length)
  +			throws SAXException {
  +        for(int i=0; i<this.lexicalHandlerList.length; i++)
  +            if (this.lexicalHandlerList[i] != null)
  +                this.lexicalHandlerList[i].comment(ary, start, length);
  +    }
  +}
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message