cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/jispstore MRUMemoryStore.java StoreJanitorImpl.java
Date Mon, 04 Feb 2002 09:51:21 GMT
cziegeler    02/02/04 01:51:21

  Modified:    src/java/org/apache/cocoon/generation AbstractGenerator.java
                        AbstractServerPage.java ComposerGenerator.java
                        DirectoryGenerator.java FileGenerator.java
                        FragmentExtractorGenerator.java Generator.java
                        HTMLGenerator.java ImageDirectoryGenerator.java
                        JspGenerator.java MP3DirectoryGenerator.java
                        PhpGenerator.java RequestGenerator.java
                        ScriptGenerator.java SearchGenerator.java
                        ServerPagesGenerator.java ServletGenerator.java
                        StatusGenerator.java StreamGenerator.java
                        VelocityGenerator.java
                        XMLDBCollectionGenerator.java XMLDBGenerator.java
               src/java/org/apache/cocoon/i18n I18nUtils.java
                        XMLResourceBundle.java
                        XMLResourceBundleFactory.java
               src/scratchpad/src/org/apache/cocoon/generation
                        XPathDirectoryGenerator.java
               src/scratchpad/src/org/apache/cocoon/jispstore
                        MRUMemoryStore.java StoreJanitorImpl.java
  Log:
  Long licence
  
  Revision  Changes    Path
  1.2       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/AbstractGenerator.java
  
  Index: AbstractGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/AbstractGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ AbstractGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.framework.parameters.Parameters;
  @@ -20,7 +67,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public abstract class AbstractGenerator extends AbstractXMLProducer implements Generator {
   
  
  
  
  1.3       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/AbstractServerPage.java
  
  Index: AbstractServerPage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/AbstractServerPage.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractServerPage.java	8 Jan 2002 10:47:45 -0000	1.2
  +++ AbstractServerPage.java	4 Feb 2002 09:51:20 -0000	1.3
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.cocoon.caching.CacheValidity;
  @@ -22,7 +69,7 @@
    * declares variables that must be explicitly initialized by code generators.
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/08 10:47:45 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 09:51:20 $
    */
   public abstract class AbstractServerPage
     extends ServletGenerator implements CompiledComponent, Cacheable
  
  
  
  1.3       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/ComposerGenerator.java
  
  Index: ComposerGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/ComposerGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ComposerGenerator.java	1 Feb 2002 14:19:53 -0000	1.2
  +++ ComposerGenerator.java	4 Feb 2002 09:51:20 -0000	1.3
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.framework.activity.Disposable;
  @@ -16,7 +63,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 14:19:53 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 09:51:20 $
    */
   public abstract class ComposerGenerator extends AbstractGenerator
   implements Composable, Disposable {
  
  
  
  1.3       +60 -13    xml-cocoon2/src/java/org/apache/cocoon/generation/DirectoryGenerator.java
  
  Index: DirectoryGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/DirectoryGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DirectoryGenerator.java	3 Feb 2002 16:18:51 -0000	1.2
  +++ DirectoryGenerator.java	4 Feb 2002 09:51:20 -0000	1.3
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   
   package org.apache.cocoon.generation;
   
  @@ -62,11 +109,11 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:conny@smb-tec.com">Conny Krappatsch</a>
    *         (SMB GmbH) for Virbus AG
  - * @version CVS $Revision: 1.2 $ $Date: 2002/02/03 16:18:51 $ */
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 09:51:20 $ */
   
   public class DirectoryGenerator extends ComposerGenerator implements Recyclable {
     private static final String FILE = "file:";
  -  
  +
       /** The URI of the namespace of this generator. */
       protected static final String URI =
       "http://apache.org/cocoon/directory/2.0";
  @@ -377,16 +424,16 @@
                   ? false
                   : this.excludeRE.match(path.getName());
       }
  -    
  +
       /**
        * Recycle resources
  -     * 
  +     *
        */
  -    
  +
       public void recycle() {
          super.recycle();
          this.attributes = null;
  -    	 this.dateFormatter = null;
  +         this.dateFormatter = null;
          this.rootRE = null;
          this.includeRE = null;
          this.excludeRE = null;
  
  
  
  1.2       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/FileGenerator.java
  
  Index: FileGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/FileGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ FileGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -33,7 +80,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 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public class FileGenerator extends ComposerGenerator
   implements Cacheable, Recyclable {
  
  
  
  1.4       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/FragmentExtractorGenerator.java
  
  Index: FragmentExtractorGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/FragmentExtractorGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FragmentExtractorGenerator.java	23 Jan 2002 20:58:11 -0000	1.3
  +++ FragmentExtractorGenerator.java	4 Feb 2002 09:51:20 -0000	1.4
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -40,7 +87,7 @@
    * and the associated transformer are very likely to fail on a clustered server.</b>
    *
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2002/01/23 20:58:11 $
  + * @version CVS $Revision: 1.4 $ $Date: 2002/02/04 09:51:20 $
    */
   public class FragmentExtractorGenerator extends AbstractGenerator
           implements Recyclable, Cacheable {
  
  
  
  1.2       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/Generator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Generator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ Generator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.cocoon.ProcessingException;
  @@ -18,7 +65,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public interface Generator extends XMLProducer, SitemapModelComponent {
   
  
  
  
  1.5       +56 -9     xml-cocoon2/src/java/org/apache/cocoon/generation/HTMLGenerator.java
  
  Index: HTMLGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/HTMLGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HTMLGenerator.java	1 Feb 2002 15:48:09 -0000	1.4
  +++ HTMLGenerator.java	4 Feb 2002 09:51:20 -0000	1.5
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -46,7 +93,7 @@
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
  - * @version CVS $Revision: 1.4 $ $Date: 2002/02/01 15:48:09 $
  + * @version CVS $Revision: 1.5 $ $Date: 2002/02/04 09:51:20 $
    */
   public class HTMLGenerator extends ComposerGenerator implements Cacheable, Recyclable, Composable, Disposable {
   
  @@ -191,7 +238,7 @@
               if(getLogger().isWarnEnabled()){
                  getLogger().warn(stringWriter.toString());
               }
  -            
  +
               if(xpath != null)
               {
                   Transformer serializer = TransformerFactory.newInstance().newTransformer();
  
  
  
  1.2       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/ImageDirectoryGenerator.java
  
  Index: ImageDirectoryGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/ImageDirectoryGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ImageDirectoryGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ ImageDirectoryGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.log.Hierarchy;
  @@ -17,7 +64,7 @@
    * files.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald A. Ball Jr.</a>
  - * @version $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public class ImageDirectoryGenerator extends DirectoryGenerator {
   
  
  
  
  1.2       +56 -9     xml-cocoon2/src/java/org/apache/cocoon/generation/JspGenerator.java
  
  Index: JspGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/JspGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JspGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ JspGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -32,7 +79,7 @@
    * results into SAX events.
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public class JspGenerator extends ServletGenerator implements Recyclable, Configurable {
   
  @@ -50,7 +97,7 @@
               (HttpServletResponse)this.objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
           HttpServletRequest httpRequest =
               (HttpServletRequest)this.objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
  -        ServletContext httpContext = 
  +        ServletContext httpContext =
               (ServletContext)this.objectModel.get(HttpEnvironment.HTTP_SERVLET_CONTEXT);
   
           if (httpResponse == null || httpRequest == null || httpContext == null) {
  
  
  
  1.2       +63 -16    xml-cocoon2/src/java/org/apache/cocoon/generation/MP3DirectoryGenerator.java
  
  Index: MP3DirectoryGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/MP3DirectoryGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MP3DirectoryGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ MP3DirectoryGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import java.io.File;
  @@ -35,7 +82,7 @@
    * </blockquote>
    *
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public class MP3DirectoryGenerator extends DirectoryGenerator
   {
  @@ -106,7 +153,7 @@
           if (in.read(buf,0, 128) != 128) return;
           // Check TAG presence
           if(buf[0] != 'T' || buf[1] != 'A' || buf[2] != 'G') return;
  -         
  +
           s = new String(buf, 3, 30).trim();
           if(s.length() > 0)
               attributes.addAttribute("", MP3_TITLE_ATTR_NAME, MP3_TITLE_ATTR_NAME, "CDATA", s);
  @@ -183,11 +230,11 @@
           if (sync) sync = ((header >>> 10) & 3) != 3;
           // filter out invalid layer
           if (sync) sync = ((header >>> 17) & 3) != 0;
  -        // filter out invalid version 
  +        // filter out invalid version
           if (sync) sync = ((header >>> 19) & 3) != 1;
           return sync;
       }
  -    
  +
       private int getVBRHeaderFrames(RandomAccessFile in, int version, int mode) throws IOException
       {
           byte[] buffer = new byte[12];
  @@ -223,7 +270,7 @@
                (buffer[7] & 0xFF);
   
           if ((flags & VBR_FRAMES_FLAG) == VBR_FRAMES_FLAG){
  -            int frames = 
  +            int frames =
                   ((buffer[ 8] & 0xFF) << 24) |
                   ((buffer[ 9] & 0xFF) << 16) |
                   ((buffer[10] & 0xFF) <<  8) |
  @@ -233,7 +280,7 @@
               return -1;
           }
       }
  -    
  +
       // version - layer - bitrate index
       private static final String bitrates[][][] =
       {
  @@ -254,16 +301,16 @@
           {"free format", "32", "40", "48", "56", "64", "80" , "96", "112", "128", "160", "192", "224", "256", "320", "forbidden"}
         }
       };
  -    
  +
       private static String bitrate(int version, int layer, int bitrate_index)
       {
           return bitrates[version & 1][layer - 1][bitrate_index];
       }
  -    
  +
       private static String mode(int mode)
       {
           switch(mode)
  -        { 
  +        {
           case MODE_STEREO:
               return "Stereo";
           case MODE_JOINT_STEREO:
  
  
  
  1.2       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/PhpGenerator.java
  
  Index: PhpGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/PhpGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PhpGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ PhpGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -32,7 +79,7 @@
    * results into SAX events.
    *
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public class PhpGenerator extends ServletGenerator implements Recyclable {
   
  
  
  
  1.2       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/RequestGenerator.java
  
  Index: RequestGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/RequestGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ RequestGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -39,7 +86,7 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public class RequestGenerator extends ServletGenerator implements Parameterizable, Recyclable {
   
  
  
  
  1.4       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/ScriptGenerator.java
  
  Index: ScriptGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/ScriptGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ScriptGenerator.java	25 Jan 2002 03:48:30 -0000	1.3
  +++ ScriptGenerator.java	4 Feb 2002 09:51:20 -0000	1.4
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   
   package org.apache.cocoon.generation;
   
  @@ -45,7 +92,7 @@
    * </pre>
    *
    * @author <a href="mailto:jafoster@engmail.uwaterloo.ca">Jason Foster</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2002/01/25 03:48:30 $
  + * @version CVS $Revision: 1.4 $ $Date: 2002/02/04 09:51:20 $
    */
   public class ScriptGenerator extends ComposerGenerator implements Configurable,
   Recyclable {
  
  
  
  1.4       +71 -24    xml-cocoon2/src/java/org/apache/cocoon/generation/SearchGenerator.java
  
  Index: SearchGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/SearchGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SearchGenerator.java	1 Feb 2002 14:19:53 -0000	1.3
  +++ SearchGenerator.java	4 Feb 2002 09:51:20 -0000	1.4
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.framework.activity.Initializable;
  @@ -48,7 +95,7 @@
    *
    * <p>
    *  This generator generates xml content representening an XML search.
  - *  The generated xml content contains the search result, 
  + *  The generated xml content contains the search result,
    *  the search query information, and navigation information about the
    *  search results.
    * </p>
  @@ -79,7 +126,7 @@
    *
    * @author     <a href="mailto:berni_huber@a1.net">Bernhard Huber</a>
    * @author     <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version    CVS $Id: SearchGenerator.java,v 1.3 2002/02/01 14:19:53 vgritsenko Exp $
  + * @version    CVS $Id: SearchGenerator.java,v 1.4 2002/02/04 09:51:20 cziegeler Exp $
    */
   public class SearchGenerator extends ComposerGenerator
       implements Recyclable, Contextualizable, Initializable, Disposable
  @@ -614,14 +661,14 @@
           long time = System.currentTimeMillis();
   
           atts.clear();
  -        atts.addAttribute(namespace, DATE_ATTRIBUTE, 
  +        atts.addAttribute(namespace, DATE_ATTRIBUTE,
               DATE_ATTRIBUTE, CDATA, String.valueOf(time));
           if (queryString != null && queryString.length() > 0)
  -            atts.addAttribute(namespace, QUERY_STRING_ATTRIBUTE, 
  +            atts.addAttribute(namespace, QUERY_STRING_ATTRIBUTE,
                   QUERY_STRING_ATTRIBUTE, CDATA, String.valueOf(queryString));
  -        atts.addAttribute(namespace, START_INDEX_ATTRIBUTE, 
  +        atts.addAttribute(namespace, START_INDEX_ATTRIBUTE,
               START_INDEX_ATTRIBUTE, CDATA, String.valueOf(startIndex));
  -        atts.addAttribute(namespace, PAGE_LENGTH_ATTRIBUTE, 
  +        atts.addAttribute(namespace, PAGE_LENGTH_ATTRIBUTE,
               PAGE_LENGTH_ATTRIBUTE, CDATA, String.valueOf(pageLength));
   
           contentHandler.startElement(namespace, RESULTS_ELEMENT, RESULTS_ELEMENT, atts);
  @@ -646,9 +693,9 @@
       private void generateHits(LuceneCocoonPager pager) throws SAXException, ProcessingException {
           if (pager != null && pager.hasNext()) {
               atts.clear();
  -            atts.addAttribute(namespace, TOTAL_COUNT_ATTRIBUTE, TOTAL_COUNT_ATTRIBUTE, 
  +            atts.addAttribute(namespace, TOTAL_COUNT_ATTRIBUTE, TOTAL_COUNT_ATTRIBUTE,
                   CDATA, String.valueOf(pager.getCountOfHits()));
  -            atts.addAttribute(namespace, COUNT_OF_PAGES_ATTRIBUTE, COUNT_OF_PAGES_ATTRIBUTE, 
  +            atts.addAttribute(namespace, COUNT_OF_PAGES_ATTRIBUTE, COUNT_OF_PAGES_ATTRIBUTE,
                   CDATA, String.valueOf(pager.getCountOfPages()));
               contentHandler.startElement(namespace, HITS_ELEMENT, HITS_ELEMENT, atts);
               generateHit(pager);
  @@ -705,17 +752,17 @@
           if (pager != null) {
               // generate navigation element
               atts.clear();
  -            atts.addAttribute(namespace, TOTAL_COUNT_ATTRIBUTE, TOTAL_COUNT_ATTRIBUTE, 
  +            atts.addAttribute(namespace, TOTAL_COUNT_ATTRIBUTE, TOTAL_COUNT_ATTRIBUTE,
                   CDATA, String.valueOf(pager.getCountOfHits()));
  -            atts.addAttribute(namespace, COUNT_OF_PAGES_ATTRIBUTE, COUNT_OF_PAGES_ATTRIBUTE, 
  +            atts.addAttribute(namespace, COUNT_OF_PAGES_ATTRIBUTE, COUNT_OF_PAGES_ATTRIBUTE,
                   CDATA, String.valueOf(pager.getCountOfPages()));
  -            atts.addAttribute(namespace, HAS_NEXT_ATTRIBUTE, HAS_NEXT_ATTRIBUTE, 
  +            atts.addAttribute(namespace, HAS_NEXT_ATTRIBUTE, HAS_NEXT_ATTRIBUTE,
                   CDATA, String.valueOf(pager.hasNext()));
  -            atts.addAttribute(namespace, HAS_PREVIOUS_ATTRIBUTE, HAS_PREVIOUS_ATTRIBUTE, 
  +            atts.addAttribute(namespace, HAS_PREVIOUS_ATTRIBUTE, HAS_PREVIOUS_ATTRIBUTE,
                   CDATA, String.valueOf(pager.hasPrevious()));
  -            atts.addAttribute(namespace, NEXT_INDEX_ATTRIBUTE, NEXT_INDEX_ATTRIBUTE, 
  +            atts.addAttribute(namespace, NEXT_INDEX_ATTRIBUTE, NEXT_INDEX_ATTRIBUTE,
                   CDATA, String.valueOf(pager.nextIndex()));
  -            atts.addAttribute(namespace, PREVIOUS_INDEX_ATTRIBUTE, PREVIOUS_INDEX_ATTRIBUTE, 
  +            atts.addAttribute(namespace, PREVIOUS_INDEX_ATTRIBUTE, PREVIOUS_INDEX_ATTRIBUTE,
                   CDATA, String.valueOf(pager.previousIndex()));
               contentHandler.startElement(namespace, NAVIGATION_ELEMENT, NAVIGATION_ELEMENT, atts);
               int count_of_pages = pager.getCountOfPages();
  @@ -723,7 +770,7 @@
                       i < count_of_pages;
                       i++, page_start_index += pageLength.intValue()) {
                   atts.clear();
  -                atts.addAttribute(namespace, START_INDEX_ATTRIBUTE, START_INDEX_ATTRIBUTE, 
  +                atts.addAttribute(namespace, START_INDEX_ATTRIBUTE, START_INDEX_ATTRIBUTE,
                       CDATA, String.valueOf(page_start_index));
                   contentHandler.startElement(namespace, NAVIGATION_PAGE_ELEMENT, NAVIGATION_PAGE_ELEMENT, atts);
                   contentHandler.endElement(namespace, NAVIGATION_PAGE_ELEMENT, NAVIGATION_PAGE_ELEMENT);
  @@ -741,7 +788,7 @@
        * @throws  ProcessingException  iff an error occurs
        */
       private LuceneCocoonPager buildHits() throws ProcessingException {
  -        
  +
           if (queryString != null && queryString.length() != 0) {
               Hits hits = null;
   
  @@ -764,7 +811,7 @@
                       lcs = null;
                   }
               }
  -        
  +
               // wrap the hits by an pager help object for accessing only a range of hits
               LuceneCocoonPager pager = new LuceneCocoonPager(hits);
   
  
  
  
  1.7       +89 -42    xml-cocoon2/src/java/org/apache/cocoon/generation/ServerPagesGenerator.java
  
  Index: ServerPagesGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/ServerPagesGenerator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ServerPagesGenerator.java	1 Feb 2002 15:48:09 -0000	1.6
  +++ ServerPagesGenerator.java	4 Feb 2002 09:51:20 -0000	1.7
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.collections.ArrayStack;
  @@ -47,7 +94,7 @@
    * This class acts as a proxy to a dynamically loaded<code>Generator</code>
    * delegating actual SAX event generation.
    * <p>
  - * It has a single configuration item : 
  + * It has a single configuration item :
    * <code>&lt;autocomplete-documents&gttrue|false&lt;autocomplete-documents&gt;</code>
    * (default is <code>false</code>).
    * <p>
  @@ -59,7 +106,7 @@
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Revision: 1.6 $ $Date: 2002/02/01 15:48:09 $
  + * @version CVS $Revision: 1.7 $ $Date: 2002/02/04 09:51:20 $
    */
   public class ServerPagesGenerator extends ServletGenerator
     implements Recyclable, Disposable, Cacheable, Configurable
  @@ -68,14 +115,14 @@
        * The sitemap-defined server pages program generator
        */
       protected ProgramGenerator programGenerator = null;
  -    
  +
       protected XSPGenerator generator = null;
  -    
  +
       /** The source */
       private Source inputSource;
  -    
  +
       private CompletionPipe completionPipe;
  -    
  +
       /**
        * Set the global component manager. This method sets the sitemap-defined
        * program generator
  @@ -84,7 +131,7 @@
        */
       public void compose(ComponentManager manager) throws ComponentException {
           super.compose(manager);
  -        
  +
           if (programGenerator == null) {
               this.programGenerator =
                   (ProgramGenerator) manager.lookup(ProgramGenerator.ROLE);
  @@ -99,7 +146,7 @@
               this.completionPipe.setLogger(getLogger());
           }
       }
  -    
  +
       /**
        * Generates the unique key.
        * This key must be unique inside the space of this component.
  @@ -133,17 +180,17 @@
        * The loaded generator's <code>MarkupLanguage</code>
        */
       protected String markupLanguage;
  -    
  +
       /**
        * The loaded generator's <code>ProgrammingLanguage</code>
        */
       protected String programmingLanguage;
  -    
  +
       /**
        * The default <code>MarkupLanguage</code>
        */
       public final static String DEFAULT_MARKUP_LANGUAGE = "xsp";
  -    
  +
       /**
        * The default <code>ProgrammingLanguage</code>
        */
  @@ -154,7 +201,7 @@
   
           super.setup(resolver, objectModel, src, par);
           this.inputSource = this.resolver.resolve(super.source);
  -        
  +
           if (this.markupLanguage == null) {
               this.markupLanguage = this.parameters.getParameter(
                 "markup-language", DEFAULT_MARKUP_LANGUAGE
  @@ -163,7 +210,7 @@
                 "programming-language", DEFAULT_PROGRAMMING_LANGUAGE
               );
           }
  -        
  +
           try {
               generator = (XSPGenerator) programGenerator.load(
                   this.manager, super.source, this.markupLanguage,
  @@ -177,7 +224,7 @@
               getLogger().warn("Failed to load class: " + e);
               throw new ResourceNotFoundException(e.getMessage());
           }
  -        
  +
           // Give our own logger to the generator so that logs go in the correct category
           if (generator instanceof Loggable) {
               ((Loggable)generator).setLogger(getLogger());
  @@ -215,7 +262,7 @@
                   generator.setLexicalHandler(this.lexicalHandler);
               }
           }
  -    
  +
           // Fixes BUG#4062: Set document locator which is used by XIncludeTransformer
           org.xml.sax.helpers.LocatorImpl locator = new org.xml.sax.helpers.LocatorImpl();
           locator.setSystemId(this.inputSource.getSystemId());
  @@ -241,7 +288,7 @@
                   programGenerator.release(generator);
               generator = null;
           }
  -        
  +
           if (this.completionPipe != null) {
               this.completionPipe.flushEvents();
           }
  @@ -307,7 +354,7 @@
               super.startDocument();
               this.eventStack.push(DOCUMENT_OBJ);
           }
  -    
  +
           /**
            * Receive notification of the end of a document.
            */
  @@ -315,7 +362,7 @@
               this.eventStack.pop();
               super.endDocument();
           }
  -    
  +
           /**
            * Receive notification of the beginning of an element.
            */
  @@ -327,7 +374,7 @@
               this.eventStack.push(namespaceURI);
               this.eventStack.push(ELEMENT_OBJ);
           }
  -    
  +
           /**
            * Receive notification of the end of an element.
            */
  @@ -339,7 +386,7 @@
               this.eventStack.pop(); // rawName
               super.endElement(namespaceURI, localName, rawName);
           }
  -    
  +
           /**
            * Begin the scope of a prefix-URI Namespace mapping.
            */
  @@ -348,7 +395,7 @@
               this.eventStack.push(prefix);
               this.eventStack.push(PREFIX_MAPPING_OBJ);
           }
  -    
  +
           /**
            * End the scope of a prefix-URI mapping.
            */
  @@ -357,43 +404,43 @@
               this.eventStack.pop(); // prefix
               super.endPrefixMapping(prefix);
           }
  -        
  +
           public void startCDATA() throws SAXException {
               super.startCDATA();
               this.eventStack.push(CDATA_OBJ);
           }
  -        
  +
           public void endCDATA() throws SAXException {
               this.eventStack.pop();
               super.endCDATA();
           }
  -        
  +
           public void startDTD(String name, String publicId, String systemId)
             throws SAXException
           {
               super.startDTD(name, publicId, systemId);
               this.eventStack.push(DTD_OBJ);
           }
  -        
  +
           public void endDTD() throws SAXException {
               this.eventStack.pop();
               super.endDTD();
           }
  -        
  +
           public void startEntity(String name) throws SAXException {
               super.startEntity(name);
               this.eventStack.push(name);
               this.eventStack.push(ENTITY_OBJ);
           }
  -    
  +
           public void endEntity(String name) throws SAXException {
               this.eventStack.pop(); // ENTITY_OBJ
               this.eventStack.pop(); // name
               super.endEntity(name);
           }
  -        
  +
           public void flushEvents() throws SAXException {
  -            
  +
               if (this.getLogger().isWarnEnabled()) {
                   if (this.eventStack.size() > 0) {
                       this.getLogger().warn("Premature end of document generated by " + inputSource.getSystemId());
  @@ -403,31 +450,31 @@
               // End any started events in case of premature return
               while (this.eventStack.size() != 0) {
                   int event = ((Integer)eventStack.pop()).intValue();
  -                
  +
                   switch(event) {
                       case DOCUMENT :
                           super.endDocument();
                           break;
  -                        
  +
                       case ELEMENT :
                           String namespaceURI = (String)eventStack.pop();
                           String localName    = (String)eventStack.pop();
                           String rawName      = (String)eventStack.pop();
                           super.endElement(namespaceURI, localName, rawName);
                           break;
  -                        
  +
                       case PREFIX_MAPPING :
                           super.endPrefixMapping((String)eventStack.pop());
                           break;
  -                      
  +
                       case CDATA:
                           super.endCDATA();
                           break;
  -        
  +
                       case DTD:
                           super.endDTD();
                           break;
  -        
  +
                       case ENTITY:
                           super.endEntity((String)eventStack.pop());
                           break;
  
  
  
  1.3       +55 -8     xml-cocoon2/src/java/org/apache/cocoon/generation/ServletGenerator.java
  
  Index: ServletGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/ServletGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServletGenerator.java	1 Feb 2002 14:19:53 -0000	1.2
  +++ ServletGenerator.java	4 Feb 2002 09:51:20 -0000	1.3
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.framework.parameters.Parameters;
  @@ -24,7 +71,7 @@
   /**
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/02/01 14:19:53 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 09:51:20 $
    */
   public abstract class ServletGenerator extends ComposerGenerator {
   
  
  
  
  1.2       +60 -13    xml-cocoon2/src/java/org/apache/cocoon/generation/StatusGenerator.java
  
  Index: StatusGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/StatusGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StatusGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ StatusGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  -* 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.                                                         *
  -*****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.framework.component.ComponentException;
  @@ -53,7 +100,7 @@
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a> (Luminas Limited)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:skoechlin@ivision.fr">S&eacute;bastien K&oelig;chlin</a> (iVision)
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 09:51:20 $
    */
   public class StatusGenerator extends ComposerGenerator implements Recyclable {
   
  @@ -197,7 +244,7 @@
                   String line = null;
                   if( val == null ) {
                       empty++;
  -		} else {
  +        } else {
                       line = key.toString() + " (class: " +
                              val.getClass().getName() +
                           ")" ;
  @@ -208,7 +255,7 @@
   
   
               };
  -    
  +
               if (size == 0) {
                   atts.clear();
                   ch.startElement(namespace, "line", "line", atts);
  @@ -216,14 +263,14 @@
                   ch.characters(value.toCharArray(), 0, value.length());
                   ch.endElement(namespace, "line", "line");
               }
  -            
  +
               ch.endElement(namespace, "value", "value");
  -                
  +
               addValue(ch, "size", String.valueOf(size) + " items in cache (" + empty + " are empty)");
               endGroup(ch);
           };
           endGroup(ch);
  -        // END Cache    
  +        // END Cache
   
           // BEGIN OS info
           endGroup(ch);
  
  
  
  1.3       +132 -85   xml-cocoon2/src/java/org/apache/cocoon/generation/StreamGenerator.java
  
  Index: StreamGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/StreamGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StreamGenerator.java	1 Feb 2002 15:48:09 -0000	1.2
  +++ StreamGenerator.java	4 Feb 2002 09:51:20 -0000	1.3
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   
   package org.apache.cocoon.generation;
   
  @@ -44,7 +91,7 @@
    * number of bytes read is equal to the getContentLength() value.
    *
    * @author <a href="mailto:Kinga_Dziembowski@hp.com">Kinga Dziembowski</a>
  - * @version $Revision: 1.2 $ $Date: 2002/02/01 15:48:09 $
  + * @version $Revision: 1.3 $ $Date: 2002/02/04 09:51:20 $
    */
   public class StreamGenerator extends ComposerGenerator implements Poolable
   {
  @@ -77,7 +124,7 @@
           Parser parser = null;
           String parameter = parameters.getParameter(StreamGenerator.FORM_NAME, null);
           int len = 0;
  -		String contentType = null;
  +        String contentType = null;
           try
           {
               HttpServletRequest request = (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
  @@ -104,9 +151,9 @@
                   getLogger().debug("processing stream ContentType= " + request.getContentType() + "ContentLen= " + len);
               }
               String charset =  getCharacterEncoding(request, contentType) ;
  -			if( charset != null)
  -			{
  -				this.inputSource.setEncoding(charset);
  +            if( charset != null)
  +            {
  +                this.inputSource.setEncoding(charset);
               }
               parser = (Parser)this.manager.lookup(Parser.ROLE);
               parser.setContentHandler(super.contentHandler);
  @@ -127,80 +174,80 @@
       }
   
       /**
  -	* Content type HTTP header can contains character encodinf info
  -	* for ex. Content-Type: text/xml; charset=UTF-8
  -	* If the servlet is following spec 2.3 and higher the servlet API can be used to retrieve character encoding part of
  -	* Content-Type header. Some containers can choose to not unpack charset info - the spec is not strong about it.
  -	* in any case this method can be used as a latest resource to retrieve the passed charset value.
  -	* <code>null</code> is returned.
  -	* It is very common mistake to send : Content-Type: text/xml; charset="UTF-8".
  -	* Some containers are not filtering this mistake and the processing results in exception..
  +    * Content type HTTP header can contains character encodinf info
  +    * for ex. Content-Type: text/xml; charset=UTF-8
  +    * If the servlet is following spec 2.3 and higher the servlet API can be used to retrieve character encoding part of
  +    * Content-Type header. Some containers can choose to not unpack charset info - the spec is not strong about it.
  +    * in any case this method can be used as a latest resource to retrieve the passed charset value.
  +    * <code>null</code> is returned.
  +    * It is very common mistake to send : Content-Type: text/xml; charset="UTF-8".
  +    * Some containers are not filtering this mistake and the processing results in exception..
       * The getCharacterEncoding() compensates for above mistake.
  -	*
  -	* @param contentType value associated with Content-Type HTTP header.
  -	*/
  -	public String getCharacterEncoding(HttpServletRequest req, String contentType)
  -	{
  -		String charencoding = null;
  -		String charset = "charset=";
  -		if (contentType == null)
  -		{
  -			return (null);
  -		}
  -		int idx = contentType.indexOf(charset);
  -		if (idx == -1)
  -		{
  -			return (null);
  -		}
  -		try
  -		{
  -			charencoding = req.getCharacterEncoding();
  -
  -			if ( charencoding != null)
  -			{
  -				getLogger().debug("charset from container: " + charencoding);
  -				charencoding = charencoding.trim();
  -				if ((charencoding.length() > 2) && (charencoding.startsWith("\""))&& (charencoding.endsWith("\"")))
  -				{
  -					charencoding = charencoding.substring(1, charencoding.length() - 1);
  -				}
  -				getLogger().debug("charset from container clean: " + charencoding);
  -				return (charencoding);
  -			}
  -			else
  -			{
  -
  -				return extractCharset( contentType, idx );
  -			}
  -		}
  -		catch(Throwable e)
  -		{
  -			// We will be there if the container do not implement getCharacterEncoding() method
  -			 return extractCharset( contentType, idx );
  -		}
  -	}
  -
  -
  -	protected String extractCharset(String contentType, int idx)
  -	{
  -		String charencoding = null;
  -		String charset = "charset=";
  -
  -		getLogger().debug("charset from extractCharset");
  -		charencoding = contentType.substring(idx + charset.length());
  -		int idxEnd = charencoding.indexOf(";");
  -		if (idxEnd != -1)
  -		{
  -			charencoding = charencoding.substring(0, idxEnd);
  -		}
  -		charencoding = charencoding.trim();
  -		if ((charencoding.length() > 2) && (charencoding.startsWith("\""))&& (charencoding.endsWith("\"")))
  -		{
  -			charencoding = charencoding.substring(1, charencoding.length() - 1);
  -		}
  -		getLogger().debug("charset from extractCharset: " + charencoding);
  -		return (charencoding.trim());
  +    *
  +    * @param contentType value associated with Content-Type HTTP header.
  +    */
  +    public String getCharacterEncoding(HttpServletRequest req, String contentType)
  +    {
  +        String charencoding = null;
  +        String charset = "charset=";
  +        if (contentType == null)
  +        {
  +            return (null);
  +        }
  +        int idx = contentType.indexOf(charset);
  +        if (idx == -1)
  +        {
  +            return (null);
  +        }
  +        try
  +        {
  +            charencoding = req.getCharacterEncoding();
   
  -	}
  +            if ( charencoding != null)
  +            {
  +                getLogger().debug("charset from container: " + charencoding);
  +                charencoding = charencoding.trim();
  +                if ((charencoding.length() > 2) && (charencoding.startsWith("\""))&& (charencoding.endsWith("\"")))
  +                {
  +                    charencoding = charencoding.substring(1, charencoding.length() - 1);
  +                }
  +                getLogger().debug("charset from container clean: " + charencoding);
  +                return (charencoding);
  +            }
  +            else
  +            {
  +
  +                return extractCharset( contentType, idx );
  +            }
  +        }
  +        catch(Throwable e)
  +        {
  +            // We will be there if the container do not implement getCharacterEncoding() method
  +             return extractCharset( contentType, idx );
  +        }
  +    }
  +
  +
  +    protected String extractCharset(String contentType, int idx)
  +    {
  +        String charencoding = null;
  +        String charset = "charset=";
  +
  +        getLogger().debug("charset from extractCharset");
  +        charencoding = contentType.substring(idx + charset.length());
  +        int idxEnd = charencoding.indexOf(";");
  +        if (idxEnd != -1)
  +        {
  +            charencoding = charencoding.substring(0, idxEnd);
  +        }
  +        charencoding = charencoding.trim();
  +        if ((charencoding.length() > 2) && (charencoding.startsWith("\""))&& (charencoding.endsWith("\"")))
  +        {
  +            charencoding = charencoding.substring(1, charencoding.length() - 1);
  +        }
  +        getLogger().debug("charset from extractCharset: " + charencoding);
  +        return (charencoding.trim());
  +
  +    }
   }
   
  
  
  
  1.3       +152 -105  xml-cocoon2/src/java/org/apache/cocoon/generation/VelocityGenerator.java
  
  Index: VelocityGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/VelocityGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VelocityGenerator.java	25 Jan 2002 03:48:30 -0000	1.2
  +++ VelocityGenerator.java	4 Feb 2002 09:51:20 -0000	1.3
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -54,7 +101,7 @@
    * <p>
    * Attributes:
    * <dl>
  - * <dt>usecache (optional; default: 'false')</dt> 
  + * <dt>usecache (optional; default: 'false')</dt>
    * <dd>set to 'true' to enable template caching on the 'cocoon'
    * resource loader</dd>
    *
  @@ -125,21 +172,21 @@
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:mike@hihat.net">Michael McKibben</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/25 03:48:30 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 09:51:20 $
    */
  -public class VelocityGenerator extends ComposerGenerator 
  -    implements Initializable, Configurable, Recyclable, LogSystem 
  +public class VelocityGenerator extends ComposerGenerator
  +    implements Initializable, Configurable, Recyclable, LogSystem
   {
   
       /**
        * Velocity {@link org.apache.velocity.runtime.resource.loader.ResourceLoader}
  -     * implementation to load template resources using Cocoon's 
  +     * implementation to load template resources using Cocoon's
        *{@link SourceResolver}. This class is created by the Velocity
        * framework via the ResourceLoaderFactory.
        *
  -     * @see org.apache.velocity.runtime.resource.loader.ResourceLoader 
  +     * @see org.apache.velocity.runtime.resource.loader.ResourceLoader
        */
  -    public static class TemplateLoader extends org.apache.velocity.runtime.resource.loader.ResourceLoader 
  +    public static class TemplateLoader extends org.apache.velocity.runtime.resource.loader.ResourceLoader
       {
           private Context resolverContext;
   
  @@ -154,13 +201,13 @@
            * 	'context' property is not set.
            * @throws ClassCastException if the 'context' property is not
            * 	of type {@link Context}.
  -         * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#init 
  -	 */
  -        public void init(ExtendedProperties config) 
  -	{
  +         * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#init
  +     */
  +        public void init(ExtendedProperties config)
  +    {
               this.resolverContext = (Context)config.get("context");
  -            if (this.resolverContext == null) 
  -	    {
  +            if (this.resolverContext == null)
  +        {
                   throw new IllegalArgumentException("Runtime Cocoon resolver context not specified in resource loader configuration.");
               }
           }
  @@ -169,18 +216,18 @@
            * @param systemId the path to the resource
            * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#getResourceStream
            */
  -        public InputStream getResourceStream(String systemId) throws org.apache.velocity.exception.ResourceNotFoundException 
  -	{
  -            try 
  -	    {
  +        public InputStream getResourceStream(String systemId) throws org.apache.velocity.exception.ResourceNotFoundException
  +    {
  +            try
  +        {
                   return resolveSource(systemId).getInputStream();
  -            } 
  -	    catch (org.apache.velocity.exception.ResourceNotFoundException ex) 
  -	    {
  +            }
  +        catch (org.apache.velocity.exception.ResourceNotFoundException ex)
  +        {
                   throw ex;
  -            } 
  -	    catch (Exception ex) 
  -	    {
  +            }
  +        catch (Exception ex)
  +        {
                   throw new org.apache.velocity.exception.ResourceNotFoundException("Unable to resolve source: " + ex);
               }
           }
  @@ -188,15 +235,15 @@
           /**
            * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#isSourceModified
            */
  -        public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource) 
  -	{
  +        public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
  +    {
               long lastModified = 0;
  -            try 
  -	    {
  +            try
  +        {
                   lastModified = resolveSource(resource.getName()).getLastModified();
  -            } 
  -	    catch (Exception ex) 
  -	    {
  +            }
  +        catch (Exception ex)
  +        {
                   super.rsvc.warn("Unable to determine last modified for resource: " + resource.getName() + ": " + ex);
               }
   
  @@ -206,15 +253,15 @@
           /**
            * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#getLastModified
            */
  -        public long getLastModified(org.apache.velocity.runtime.resource.Resource resource) 
  -	{
  +        public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
  +    {
               long lastModified = 0;
  -            try 
  -	    {
  +            try
  +        {
                   lastModified = resolveSource(resource.getName()).getLastModified();
  -            } 
  -	    catch (Exception ex) 
  -	    {
  +            }
  +        catch (Exception ex)
  +        {
                   super.rsvc.warn("Unable to determine last modified for resource: " + resource.getName() + ": " + ex);
               }
   
  @@ -227,7 +274,7 @@
            *
            * @param systemId the path to the resource
            */
  -        private Source resolveSource(String systemId) throws org.apache.velocity.exception.ResourceNotFoundException 
  +        private Source resolveSource(String systemId) throws org.apache.velocity.exception.ResourceNotFoundException
           {
               Map sourceCache;
               try {
  @@ -265,7 +312,7 @@
   
       /**
        * Key to lookup the {@link SourceResolver} from the context of
  -     * the resource loader 
  +     * the resource loader
        */
       final private static String CONTEXT_RESOLVER_KEY = "resolver";
   
  @@ -284,11 +331,11 @@
       /**
        * Read any additional objects to export to the Velocity context
        * from the configuration.
  -     * 
  +     *
        * @param configuration the class configurations.
  -     * @see org.apache.avalon.framework.configuration.Configurable#configure 
  +     * @see org.apache.avalon.framework.configuration.Configurable#configure
        */
  -    public void configure(Configuration configuration) throws ConfigurationException 
  +    public void configure(Configuration configuration) throws ConfigurationException
       {
           this.resolverContext = new DefaultContext();
           this.objectExports = new ArrayList();
  @@ -305,18 +352,18 @@
           // Read in any additional properties to pass to the VelocityEngine during initialization
           //
           Configuration[] properties = configuration.getChildren("property");
  -        for (int i=0; i < properties.length; ++i) 
  -	{
  +        for (int i=0; i < properties.length; ++i)
  +    {
               Configuration c = properties[i];
               String name = c.getAttribute("name");
   
               // disallow setting of certain properties
               //
               if (name.startsWith("runtime.log")
  -                || name.indexOf(".resource.loader.") != -1) 
  -	    {
  -                if (getLogger().isInfoEnabled()) 
  -		{
  +                || name.indexOf(".resource.loader.") != -1)
  +        {
  +                if (getLogger().isInfoEnabled())
  +        {
                       getLogger().info("ignoring disallowed property '" + name + "'.");
                   }
                   continue;
  @@ -328,14 +375,14 @@
           //
           List resourceLoaders = new ArrayList();
           Configuration[] loaders = configuration.getChildren("resource-loader");
  -        for (int i=0; i < loaders.length; ++i) 
  -	{
  +        for (int i=0; i < loaders.length; ++i)
  +    {
               Configuration loader = loaders[i];
               String name = loader.getAttribute("name");
  -            if (name.equals("cocoon")) 
  -	    {
  -                if (getLogger().isInfoEnabled()) 
  -		{
  +            if (name.equals("cocoon"))
  +        {
  +                if (getLogger().isInfoEnabled())
  +        {
                       getLogger().info("'cocoon' resource loader already defined.");
                   }
                   continue;
  @@ -345,8 +392,8 @@
               String type = loader.getAttribute("class");
               this.tmplEngine.setProperty(prefix + "class", type);
               Configuration [] loaderProperties = loader.getChildren("property");
  -            for (int j=0; i < loaderProperties.length; ++j) 
  -	    {
  +            for (int j=0; i < loaderProperties.length; ++j)
  +        {
                   Configuration c = loaderProperties[j];
                   String propName = c.getAttribute("name");
                   this.tmplEngine.setProperty(prefix + propName, c.getAttribute("value"));
  @@ -356,8 +403,8 @@
           // Velocity expects resource loaders as CSV list
           //
           StringBuffer buffer = new StringBuffer("cocoon");
  -        for (Iterator it = resourceLoaders.iterator(); it.hasNext(); ) 
  -	{
  +        for (Iterator it = resourceLoaders.iterator(); it.hasNext(); )
  +    {
               buffer.append(',');
               buffer.append((String)it.next());
           }
  @@ -366,8 +413,8 @@
           // read in additional objects to export from the object map
           //
           Configuration[] exports = configuration.getChildren("export-object");
  -        for (int i=0; i < exports.length; ++i) 
  -	{
  +        for (int i=0; i < exports.length; ++i)
  +    {
               Configuration c = exports[i];
               ObjectExport export = new ObjectExport();
               export.key = c.getAttribute("key");
  @@ -379,7 +426,7 @@
       /**
        * @see org.apache.avalon.framework.activity.Initializable#initialize
        */
  -    public void initialize() throws Exception 
  +    public void initialize() throws Exception
       {
           this.tmplEngine.init();
       }
  @@ -387,12 +434,12 @@
       /**
        * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup
        */
  -    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters params) throws ProcessingException,SAXException,IOException 
  +    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters params) throws ProcessingException,SAXException,IOException
  +    {
  +    if (activeFlag)
       {
  -	if (activeFlag) 
  -	{
  -	    throw new IllegalStateException("setup called on recyclable sitemap component before properly recycling previous state");
  -	}
  +        throw new IllegalStateException("setup called on recyclable sitemap component before properly recycling previous state");
  +    }
   
           super.setup(resolver, objectModel, src, params);
   
  @@ -412,34 +459,34 @@
   
           // Export any additional objects to the Velocity context
           //
  -        for (Iterator it = this.objectExports.iterator(); it.hasNext();) 
  -	{
  +        for (Iterator it = this.objectExports.iterator(); it.hasNext();)
  +    {
               ObjectExport export = (ObjectExport)it.next();
               Object object = objectModel.get(export.key);
  -            if (object != null) 
  -	    {
  +            if (object != null)
  +        {
                   this.velocityContext.put(export.name, object);
  -                if (getLogger().isDebugEnabled()) 
  -		{
  +                if (getLogger().isDebugEnabled())
  +        {
                       getLogger().debug("exporting object under key '" + export.key + "' to velocity context with name '" + export.name + "'.");
                   }
  -            } 
  -	    else if (getLogger().isInfoEnabled()) 
  -	    {
  +            }
  +        else if (getLogger().isInfoEnabled())
  +        {
                       getLogger().info("unable to export object under key '" + export.key + "' to velocity context.");
               }
           }
   
  -	this.activeFlag = true;
  +    this.activeFlag = true;
       }
   
       /**
        * Free up the VelocityContext associated with the pipeline, and
        * release any Source objects resolved by the resource loader.
        *
  -     * @see org.apache.avalon.excalibur.pool.Recyclable#recycle 
  +     * @see org.apache.avalon.excalibur.pool.Recyclable#recycle
        */
  -    public void recycle() 
  +    public void recycle()
       {
           this.activeFlag = false;
   
  @@ -463,7 +510,7 @@
        * @see org.apache.cocoon.generation.Generator#generate
        */
       public void generate()
  -    throws IOException, SAXException, ProcessingException 
  +    throws IOException, SAXException, ProcessingException
       {
           // Guard against calling generate before setup.
           if (!activeFlag) {
  @@ -511,35 +558,35 @@
        *
        * @see org.apache.velocity.runtime.log.LogSystem#init
        */
  -    public void init(RuntimeServices rs) throws Exception 
  +    public void init(RuntimeServices rs) throws Exception
       {
       }
   
       /**
  -     * Pass along Velocity log messages to our configured logger. 
  +     * Pass along Velocity log messages to our configured logger.
        *
        * @see org.apache.velocity.runtime.log.LogSystem#logVelocityMessage
        */
       public void logVelocityMessage(int level, String message)
       {
           Logger logger = getLogger();
  -        switch (level) 
  -	{
  -	    case LogSystem.WARN_ID:
  -		logger.warn(message);
  -		break;
  -	    case LogSystem.INFO_ID:
  -		logger.info(message);
  -		break;
  -	    case LogSystem.DEBUG_ID:
  -		logger.debug(message);
  -		break;
  -	    case LogSystem.ERROR_ID:
  -		logger.error(message);
  -		break;
  -	    default:
  -		logger.info(message);
  -		break;
  +        switch (level)
  +    {
  +        case LogSystem.WARN_ID:
  +        logger.warn(message);
  +        break;
  +        case LogSystem.INFO_ID:
  +        logger.info(message);
  +        break;
  +        case LogSystem.DEBUG_ID:
  +        logger.debug(message);
  +        break;
  +        case LogSystem.ERROR_ID:
  +        logger.error(message);
  +        break;
  +        default:
  +        logger.info(message);
  +        break;
           }
       }
   }
  
  
  
  1.2       +100 -53   xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBCollectionGenerator.java
  
  Index: XMLDBCollectionGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBCollectionGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLDBCollectionGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ XMLDBCollectionGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -23,20 +70,20 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   
  -import org.xmldb.api.DatabaseManager;   
  -import org.xmldb.api.base.Collection;   
  -import org.xmldb.api.base.Database;   
  -import org.xmldb.api.base.ErrorCodes;   
  -import org.xmldb.api.base.Resource;   
  -import org.xmldb.api.base.Service;   
  -import org.xmldb.api.base.XMLDBException;   
  -import org.xmldb.api.modules.XMLResource; 
  +import org.xmldb.api.DatabaseManager;
  +import org.xmldb.api.base.Collection;
  +import org.xmldb.api.base.Database;
  +import org.xmldb.api.base.ErrorCodes;
  +import org.xmldb.api.base.Resource;
  +import org.xmldb.api.base.Service;
  +import org.xmldb.api.base.XMLDBException;
  +import org.xmldb.api.modules.XMLResource;
   
   import java.io.IOException;
   import java.util.Map;
   
   /**
  - * This class implements generation of a XML:DB collection 
  + * This class implements generation of a XML:DB collection
    * contents as a directory listing.
    *
    * <pre>
  @@ -48,18 +95,18 @@
    * &lt;/base&gt;
    * </pre>
    *
  - * NOTE: the driver can be any DB:XML compliant driver (although this 
  - * component has been tested only with 
  + * NOTE: the driver can be any DB:XML compliant driver (although this
  + * component has been tested only with
    * <a href="http://www.dbxml.org">dbXML</a>, and the trailing
    * slash in the base tag is important!
    *
    * @author <a href="mailto:gianugo@rabellino.it">Gianugo Rabellino</a>
    */
  - 
  +
    public class XMLDBCollectionGenerator extends ComposerGenerator
      implements Cacheable, Recyclable,Configurable,Initializable {
   
  -    protected static final String URI = 
  +    protected static final String URI =
         "http://apache.org/cocoon/xmldb/1.0";
       protected static final String PREFIX = "collection";
       protected static final String RESOURCE_COUNT_ATTR = "resources";
  @@ -68,7 +115,7 @@
       protected static final String QCOLLECTION  = PREFIX + ":collection";
       protected static final String RESOURCE  = "resource";
       protected static final String QRESOURCE  = PREFIX + ":resource";
  -     
  +
       protected String driver;
       protected String base;
       protected String col;
  @@ -79,20 +126,20 @@
       public void compose(ComponentManager manager) throws ComponentException {
           super.compose(manager);
       }
  -    
  +
       /**
        * Recycle the component, keep only the configuration variables
        * and the database instance for reuse.
        *
        */
  -     
  +
       public void recycle() {
           super.recycle();
           this.col = null;
           this.collection = null;
           //this.attributes = null;
       }
  -    
  +
      /**
       * Configure the component. This class is expecting a configuration
       * like the following one:
  @@ -100,8 +147,8 @@
       * &lt;driver&gt;org.dbxml.client.xmldb.DatabaseImpl&lt;/driver&gt;
       * &lt;base&gt;xmldb:dbxml:///db/&lt;/base&gt;
       * </pre>
  -    * NOTE: the driver can be any DB:XML compliant driver (although this 
  -    * component has been tested only with 
  +    * NOTE: the driver can be any DB:XML compliant driver (although this
  +    * component has been tested only with
       * <a href="http://www.dbxml.org">dbXML</a>, and the trailing
       * slash in the base tag is important!
       *
  @@ -119,10 +166,10 @@
       }
   
      /**
  -    * Initialize the component getting a database instance. 
  +    * Initialize the component getting a database instance.
       *
       * @exception Exception if an error occurs
  -    */ 
  +    */
   
       public void initialize() throws Exception {
         try {
  @@ -134,69 +181,69 @@
         } catch (XMLDBException xde) {
   
           this.getLogger().error("Unable to connect to the XML:DB database");
  -        throw new ProcessingException("Unable to connect to the XML DB" 
  +        throw new ProcessingException("Unable to connect to the XML DB"
             + xde.getMessage());
   
         } catch (Exception e) {
   
           this.getLogger().error("There was a problem setting up the connection");
           this.getLogger().error("Make sure that your driver is available");
  -        throw new ProcessingException("Problem setting up the connection: " 
  +        throw new ProcessingException("Problem setting up the connection: "
             + e.getMessage());
   
  -      } 
  +      }
       }
   
  -    public void setup(SourceResolver resolver, 
  -                      Map objectModel, 
  -                      String src, 
  +    public void setup(SourceResolver resolver,
  +                      Map objectModel,
  +                      String src,
                         Parameters par)
         throws ProcessingException, SAXException,IOException {
   
         super.setup(resolver, objectModel, src, par);
   
       }
  -    
  +
       /**
        * The component isn't cached (yet)
        */
       public CacheValidity getValidity() {
         return null;
       }
  -   
  +
       /**
        * The component isn't cached (yet)
        */
       public CacheValidity generateValidity() {
         return null;
       }
  -    
  +
       /**
        * The component isn't cached (yet)
        */
       public long generateKey() {
         return 0;
       }
  -   
  -   /** 
  -    * Parse the requested URI, connect to the XML:DB database 
  +
  +   /**
  +    * Parse the requested URI, connect to the XML:DB database
       * and fetch the requested resource.
       *
       * @exception ProcessingException something unexpected happened with the DB
  -    */ 
  +    */
       public void generate()
         throws IOException, SAXException, ProcessingException {
         //String col = "/";
   
         //if (source.indexOf('/') != -1)
  -      col = source;        
  +      col = source;
   
   
         try {
           collection = DatabaseManager.getCollection(base + col);
   
           if (collection == null)
  -          throw new ResourceNotFoundException("Collection " + col + 
  +          throw new ResourceNotFoundException("Collection " + col +
               " not found");
   
           collectionToSAX(collection);
  @@ -205,20 +252,20 @@
   
         } catch (XMLDBException xde) {
   
  -        throw new ProcessingException("Unable to fetch content '" 
  +        throw new ProcessingException("Unable to fetch content '"
             + source + "':" + xde.getMessage());
   
         } catch (NullPointerException npe) {
   
             this.getLogger().error("The XML:DB driver raised an exception");
             this.getLogger().error("probably the document was not found");
  -          throw new ProcessingException("Null pointer exception while " + 
  +          throw new ProcessingException("Null pointer exception while " +
             "retrieving document : " + npe.getMessage());
   
  -      } 
  +      }
       }
   
  -    /** 
  +    /**
        * Output SAX events listing the collection.
        *
        * @exception SAXException
  @@ -248,7 +295,7 @@
           this.xmlConsumer.startDocument();
           this.xmlConsumer.startPrefixMapping(PREFIX, URI);
   
  -        this.xmlConsumer.startElement(URI, "collections", 
  +        this.xmlConsumer.startElement(URI, "collections",
             "collection:collections", attributes);
   
           // Print child collections
  @@ -256,7 +303,7 @@
           for (int i = 0; i < collections.length; i++) {
             attributes.clear();
             attributes.addAttribute("", "name", "name", "CDATA", collections[i]);
  -          this.xmlConsumer.startElement(URI, COLLECTION, 
  +          this.xmlConsumer.startElement(URI, COLLECTION,
               QCOLLECTION, attributes);
             this.xmlConsumer.endElement(URI, COLLECTION, COLLECTION);
           }
  @@ -266,17 +313,17 @@
           for (int i = 0; i < resources.length; i++) {
             attributes.clear();
             attributes.addAttribute("", "name", "name", "CDATA", resources[i]);
  -          this.xmlConsumer.startElement(URI, RESOURCE, 
  +          this.xmlConsumer.startElement(URI, RESOURCE,
               QRESOURCE, attributes);
             this.xmlConsumer.endElement(URI, RESOURCE, RESOURCE);
           }
   
  -        this.xmlConsumer.endElement(URI, "collections", 
  +        this.xmlConsumer.endElement(URI, "collections",
             "collection:collections");
  -          
  +
           this.xmlConsumer.endPrefixMapping(PREFIX);
           this.xmlConsumer.endDocument();
  -        
  +
         } catch (XMLDBException xde) {
           this.getLogger().warn("Collection listing failed" + xde.getMessage());
           throw new SAXException("Collection listing failed" + xde.getMessage());
  
  
  
  1.2       +90 -43    xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBGenerator.java
  
  Index: XMLDBGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/XMLDBGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLDBGenerator.java	3 Jan 2002 12:31:16 -0000	1.1
  +++ XMLDBGenerator.java	4 Feb 2002 09:51:20 -0000	1.2
  @@ -1,10 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.generation;
   
   import org.apache.avalon.excalibur.pool.Recyclable;
  @@ -22,14 +69,14 @@
   import org.apache.cocoon.environment.SourceResolver;
   import org.xml.sax.SAXException;
   
  -import org.xmldb.api.DatabaseManager;   
  -import org.xmldb.api.base.Collection;   
  -import org.xmldb.api.base.Database;   
  -import org.xmldb.api.base.ErrorCodes;   
  -import org.xmldb.api.base.Resource;   
  -import org.xmldb.api.base.Service;   
  -import org.xmldb.api.base.XMLDBException;   
  -import org.xmldb.api.modules.XMLResource; 
  +import org.xmldb.api.DatabaseManager;
  +import org.xmldb.api.base.Collection;
  +import org.xmldb.api.base.Database;
  +import org.xmldb.api.base.ErrorCodes;
  +import org.xmldb.api.base.Resource;
  +import org.xmldb.api.base.Service;
  +import org.xmldb.api.base.XMLDBException;
  +import org.xmldb.api.modules.XMLResource;
   
   import java.io.IOException;
   import java.util.Map;
  @@ -47,17 +94,17 @@
    * &lt;/base&gt;
    * </pre>
    *
  - * NOTE: the driver can be any DB:XML compliant driver (although this 
  - * component has been tested only with 
  + * NOTE: the driver can be any DB:XML compliant driver (although this
  + * component has been tested only with
    * <a href="http://www.dbxml.org">dbXML</a>, and the trailing
    * slash in the base tag is important!
    *
    * @author <a href="mailto:gianugo@rabellino.it">Gianugo Rabellino</a>
    */
  - 
  +
    public class XMLDBGenerator extends ComposerGenerator
      implements Cacheable, Recyclable,Configurable,Initializable {
  -     
  +
       protected String driver;
       protected String base;
       protected String col;
  @@ -69,13 +116,13 @@
       public void compose(ComponentManager manager) throws ComponentException {
           super.compose(manager);
       }
  -    
  +
       /**
        * Recycle the component, keep only the configuration variables
        * and the database instance for reuse.
        *
        */
  -     
  +
       public void recycle() {
           super.recycle();
           this.col = null;
  @@ -83,7 +130,7 @@
           this.xmlResource = null;
           this.collection = null;
       }
  -    
  +
      /**
       * Configure the component. This class is expecting a configuration
       * like the following one:
  @@ -91,8 +138,8 @@
       * &lt;driver&gt;org.dbxml.client.xmldb.DatabaseImpl&lt;/driver&gt;
       * &lt;base&gt;xmldb:dbxml:///db/&lt;/base&gt;
       * </pre>
  -    * NOTE: the driver can be any DB:XML compliant driver (although this 
  -    * component has been tested only with 
  +    * NOTE: the driver can be any DB:XML compliant driver (although this
  +    * component has been tested only with
       * <a href="http://www.dbxml.org">dbXML</a>, and the trailing
       * slash in the base tag is important!
       *
  @@ -110,10 +157,10 @@
       }
   
      /**
  -    * Initialize the component getting a database instance. 
  +    * Initialize the component getting a database instance.
       *
       * @exception Exception if an error occurs
  -    */ 
  +    */
   
       public void initialize() throws Exception {
         try {
  @@ -125,62 +172,62 @@
         } catch (XMLDBException xde) {
   
           this.getLogger().error("Unable to connect to the XML:DB database");
  -        throw new ProcessingException("Unable to connect to the XMLDB database" 
  +        throw new ProcessingException("Unable to connect to the XMLDB database"
             + xde.getMessage());
   
         } catch (Exception e) {
   
           this.getLogger().error("There was a problem setting up the connection");
           this.getLogger().error("Make sure that your driver is available");
  -        throw new ProcessingException("Problem setting up the connection: " 
  +        throw new ProcessingException("Problem setting up the connection: "
             + e.getMessage());
   
  -      } 
  +      }
       }
   
  -    public void setup(SourceResolver resolver, 
  -                      Map objectModel, 
  -                      String src, 
  +    public void setup(SourceResolver resolver,
  +                      Map objectModel,
  +                      String src,
                         Parameters par)
         throws ProcessingException, SAXException,IOException {
   
         super.setup(resolver, objectModel, src, par);
   
       }
  -    
  +
       /**
        * The component isn't cached (yet)
        */
       public CacheValidity getValidity() {
         return null;
       }
  -   
  +
       /**
        * The component isn't cached (yet)
        */
       public CacheValidity generateValidity() {
         return null;
       }
  -    
  +
       /**
        * The component isn't cached (yet)
        */
       public long generateKey() {
         return 0;
       }
  -   
  -   /** 
  -    * Parse the requested URI, connect to the XML:DB database 
  +
  +   /**
  +    * Parse the requested URI, connect to the XML:DB database
       * and fetch the requested resource.
       *
       * @exception ProcessingException something unexpected happened with the DB
  -    */ 
  +    */
       public void generate()
         throws IOException, SAXException, ProcessingException {
         String col = "/";
   
         if (source.indexOf('/') != -1)
  -        col = "/" + source.substring(0, source.lastIndexOf('/'));        
  +        col = "/" + source.substring(0, source.lastIndexOf('/'));
         res = source.substring(source.lastIndexOf('/') + 1);
   
         try {
  @@ -188,7 +235,7 @@
           xmlResource = (XMLResource) collection.getResource(res);
   
           if (xmlResource == null)
  -          throw new ResourceNotFoundException("Document " + col + "/" + res + 
  +          throw new ResourceNotFoundException("Document " + col + "/" + res +
               " not found");
   
           xmlResource.getContentAsSAX(this.xmlConsumer);
  @@ -205,9 +252,9 @@
             this.getLogger().error("The XML:DB driver raised an exception");
             this.getLogger().error("probably the document was not found");
   
  -          throw new ProcessingException("Null pointer exception while " + 
  +          throw new ProcessingException("Null pointer exception while " +
               "retrieving document : " + npe.getMessage());
   
  -      } 
  +      }
       }
   }
  
  
  
  1.2       +55 -1     xml-cocoon2/src/java/org/apache/cocoon/i18n/I18nUtils.java
  
  Index: I18nUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/I18nUtils.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- I18nUtils.java	30 Jan 2002 15:13:37 -0000	1.1
  +++ I18nUtils.java	4 Feb 2002 09:51:21 -0000	1.2
  @@ -1,4 +1,58 @@
  -package org.apache.cocoon.i18n;
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
  + package org.apache.cocoon.i18n;
   
   import java.util.Locale;
   import java.util.StringTokenizer;
  
  
  
  1.5       +60 -14    xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
  
  Index: XMLResourceBundle.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLResourceBundle.java	1 Feb 2002 15:48:09 -0000	1.4
  +++ XMLResourceBundle.java	4 Feb 2002 09:51:21 -0000	1.5
  @@ -1,11 +1,57 @@
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * The Apache Software License, Version 1.1
    *
  - * 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.
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
    */
  -//package org.apache.avalon.excalibur.i18n;
   package org.apache.cocoon.i18n;
   
   /** JDK classes **/
  @@ -32,7 +78,7 @@
    * @author <a href="mailto:mengelhart@earthtrip.com">Mike Engelhart</a>
    * @author <a href="mailto:neeme@one.lv">Neeme Praks</a>
    * @author <a href="mailto:oleg@one.lv">Oleg Podolsky</a>
  - * @version $Id: XMLResourceBundle.java,v 1.4 2002/02/01 15:48:09 sylvain Exp $
  + * @version $Id: XMLResourceBundle.java,v 1.5 2002/02/04 09:51:21 cziegeler Exp $
    */
   public class XMLResourceBundle
       extends ResourceBundle
  @@ -40,7 +86,7 @@
   {
       /** DOM factory */
       protected static DocumentBuilderFactory docfactory =
  -    	DocumentBuilderFactory.newInstance();
  +        DocumentBuilderFactory.newInstance();
   
       /** Cache for storing string values for existing XPaths */
       private Hashtable cache = new Hashtable();
  @@ -292,7 +338,7 @@
   
           if (value == null && !cacheNotFoundContains(key))
           {
  -	    if (doc != null)
  +        if (doc != null)
                   value = _getString(this.doc.getDocumentElement(), key);
   
               if (value == null)
  @@ -344,16 +390,16 @@
           for(int i = 0; i < listsize; i++)
           {
               item = list.item(i);
  -	    if(item.getNodeType() != Node.TEXT_NODE)
  -	        return null;
  +        if(item.getNodeType() != Node.TEXT_NODE)
  +            return null;
   
               itemValue = item.getNodeValue();
  -	    if(itemValue == null)
  -	        return null;
  +        if(itemValue == null)
  +            return null;
   
               itemValue = itemValue.trim();
  -	    if(itemValue.length() == 0)
  -	        return null;
  +        if(itemValue.length() == 0)
  +            return null;
   
               return itemValue;
           }
  
  
  
  1.4       +52 -6     xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java
  
  Index: XMLResourceBundleFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLResourceBundleFactory.java	31 Jan 2002 10:16:26 -0000	1.3
  +++ XMLResourceBundleFactory.java	4 Feb 2002 09:51:21 -0000	1.4
  @@ -1,11 +1,57 @@
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * The Apache Software License, Version 1.1
    *
  - * 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.
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
    */
  -//package org.apache.avalon.excalibur.i18n;
   package org.apache.cocoon.i18n;
   
   import org.apache.avalon.framework.activity.Disposable;
  @@ -35,7 +81,7 @@
    * @author <a href="mailto:mengelhart@earthtrip.com">Mike Engelhart</a>
    * @author <a href="mailto:neeme@one.lv">Neeme Praks</a>
    * @author <a href="mailto:oleg@one.lv">Oleg Podolsky</a>
  - * @version $Id: XMLResourceBundleFactory.java,v 1.3 2002/01/31 10:16:26 cziegeler Exp $
  + * @version $Id: XMLResourceBundleFactory.java,v 1.4 2002/02/04 09:51:21 cziegeler Exp $
    */
   
   public class XMLResourceBundleFactory
  
  
  
  1.2       +236 -207  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/XPathDirectoryGenerator.java
  
  Index: XPathDirectoryGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/XPathDirectoryGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XPathDirectoryGenerator.java	3 Feb 2002 16:50:35 -0000	1.1
  +++ XPathDirectoryGenerator.java	4 Feb 2002 09:51:21 -0000	1.2
  @@ -1,207 +1,236 @@
  -/*****************************************************************************
  - * 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.generation;
  -
  -import org.apache.avalon.excalibur.pool.Recyclable;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.parameters.Parameters;
  -import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
  -
  -import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.ResourceNotFoundException;
  -import org.apache.cocoon.components.parser.Parser;
  -import org.apache.cocoon.environment.Source;
  -import org.apache.cocoon.environment.SourceResolver;
  -
  -import org.apache.cocoon.xml.dom.DOMStreamer;
  -import org.apache.regexp.RE;
  -import org.apache.regexp.RESyntaxException;
  -
  -import org.w3c.dom.Document;
  -import org.w3c.dom.NodeList;
  -import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
  -
  -import java.io.File;
  -import java.io.IOException;
  -import java.net.URL;
  -import java.text.SimpleDateFormat;
  -import java.util.Date;
  -import java.util.Map;
  -import java.util.Stack;
  -
  -
  -/**
  - * Generates an XML directory listing performing XPath queries
  - * on XML files. It can be used both as a plain DirectoryGenerator
  - * or, using an "xpointerinsh" syntax it will perform an XPath
  - * query on every XML resource.
  - *
  - * Sample usage:
  - *
  - * Sitemap: 
  - * &lt;map:match pattern="documents/**"&gt;
  - *   &lt;map:generate type="xpathdirectory" 
  - *     src="docs/{1}#/article/title|/article/abstract" /&gt;
  - *   &lt;map:serialize type="xml" /&gt;
  - * &lt;/map:match&gt;  
  - * 
  - * Request:
  - *   http://www.some.host/documents/test
  -
  - * Result:
  - * &lt;dir:directory 
  - *   name="test" lastModified="1010400942000" 
  - *   date="1/7/02 11:55 AM" requested="true" 
  - *   xmlns:dir="http://apache.org/cocoon/directory/2.0"&gt;
  - *   &lt;dir:directory name="subdirectory" lastModified="1010400942000" date="1/7/02 11:55 AM" /&gt; 
  - *   &lt;dir:file name="test.xml" lastModified="1011011579000" date="1/14/02 1:32 PM"&gt;
  - *     &lt;dir:xpath docid="test.xml" query="/article/title"&gt;
  - *       &lt;title&gt;This is a test document&lt;/title&gt; 
  - *       &lt;abstract&gt;
  - *         &lt;para&gt;Abstract of my test article&lt;/para&gt; 
  - *       &lt;/abstract&gt;
  - *     &lt;/dir:xpath&gt;
  - *   &lt;/dir:file&gt;
  - *   &lt;dir:file name="test.gif" lastModified="1011011579000" date="1/14/02 1:32 PM"&gt;
  - * &lt;/dir:directory&gt;
  - *
  - * @author <a href="mailto:gianugo@apache.org">Gianugo Rabellino</a>
  - * @version CVS $Id: XPathDirectoryGenerator.java,v 1.1 2002/02/03 16:50:35 gianugo Exp $ 
  - */
  -
  -public class XPathDirectoryGenerator extends DirectoryGenerator {
  -
  -    /** Element &lt;result&gt; */
  -    protected static final String RESULT = "xpath";
  -    protected static final String QRESULT = PREFIX + ":" + RESULT;
  -    protected static final String RESULT_DOCID_ATTR = "docid";
  -    protected static final String QUERY_ATTR = "query";
  -
  -    protected static final String CDATA  = "CDATA";
  -    protected String XPathQuery = null;
  -    protected XPathProcessor processor = null;
  -    protected Parser parser;
  -    protected Document doc;
  -
  -    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
  -        throws ProcessingException, SAXException, IOException {
  -
  -        super.setup(resolver, objectModel, src, par);
  -
  -        // See if an XPath was specified
  -
  -        int pointer;
  -
  -        if ((pointer = this.source.indexOf("#")) != -1) {
  -          this.XPathQuery = source.substring(pointer + 1);
  -          this.source = source.substring(0, pointer);
  -          if (this.getLogger().isDebugEnabled())
  -            this.getLogger().debug("Applying XPath: " + XPathQuery 
  -              + " to directory " + source);
  -        }
  -
  -    }
  -
  -    public void compose(ComponentManager manager) {
  -      try {
  -        super.compose(manager);
  -        processor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);
  -        parser = (Parser)manager.lookup(Parser.ROLE);
  -      } catch (Exception e) {
  -        this.getLogger().error("Could not obtain a required component", e);
  -      }
  -    }  
  -      
  -
  -    /**
  -     * Adds a single node to the generated document. If the path is a
  -     * directory, and depth is greater than zero, then recursive calls
  -     * are made to add nodes for the directory's children. Moreover,
  -     * if the file is an XML file (ends with .xml), the XPath query
  -     * is performed and results returned.
  -     *
  -     * @param   path
  -     *      the file/directory to process
  -     * @param   depth
  -     *      how deep to scan the directory
  -     *
  -     * @throws  SAXException
  -     *      if an error occurs while constructing nodes
  -     */
  -    protected void addPath(File path, int depth)
  -    throws SAXException {
  -        if (path.isDirectory()) {
  -            startNode(DIR_NODE_NAME, path);
  -            if (depth>0) {
  -                File contents[] = path.listFiles();
  -                for (int i=0; i<contents.length; i++) {
  -                    if (isIncluded(contents[i]) && !isExcluded(contents[i])) {
  -                        addPath(contents[i], depth-1);
  -                    }
  -                }
  -            }
  -            endNode(DIR_NODE_NAME);
  -        } else {
  -            if (isIncluded(path) && !isExcluded(path)) {
  -                startNode(FILE_NODE_NAME, path);
  -                if (path.getName().endsWith(".xml") && XPathQuery != null)
  -                  performXPathQuery(path);
  -                endNode(FILE_NODE_NAME);
  -            }
  -        }
  -    }
  -
  -    protected void performXPathQuery(File in) 
  -      throws SAXException {
  -       
  -      doc = null;
  -      try {
  -        doc = parser.parseDocument(
  -      	  resolver.resolve(in.toURL().toExternalForm()).getInputSource());  
  -       } catch (SAXException se) {
  -         this.getLogger().error("Warning:" + in.getName() 
  -          + " is not a valid XML file. Ignoring");
  -       } catch (Exception e) {
  -         this.getLogger().error("Unable to resolve and parse file" + e);
  -       }
  -
  -       if (doc != null) {
  -         NodeList nl = processor.selectNodeList(doc.getDocumentElement(), XPathQuery);
  -        
  -         final String id = in.getName();
  -         
  -         AttributesImpl attributes = new AttributesImpl();
  -         attributes.addAttribute("", RESULT_DOCID_ATTR, RESULT_DOCID_ATTR,
  -           CDATA, id);
  -         attributes.addAttribute("", QUERY_ATTR, QUERY_ATTR, CDATA, 
  -           XPathQuery);  
  -    
  -         super.contentHandler.startElement(URI, RESULT, QRESULT, attributes);
  -         DOMStreamer ds = new DOMStreamer(super.xmlConsumer);
  -         for (int i = 0; i < nl.getLength(); i++)
  -           ds.stream(nl.item(i));
  -         super.contentHandler.endElement(URI, RESULT, QRESULT);
  -      } 
  -	}  
  -	
  -	/**
  -	 * Recycle resources
  -	 * 
  -	 */
  -	
  -   public void recycle() {
  -      super.recycle(); 
  -      this.XPathQuery = null;
  -      this.attributes = null;
  -      this.doc = null;
  -    }
  -}
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
  +
  +package org.apache.cocoon.generation;
  +
  +import org.apache.avalon.excalibur.pool.Recyclable;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
  +import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.ResourceNotFoundException;
  +import org.apache.cocoon.components.parser.Parser;
  +import org.apache.cocoon.environment.Source;
  +import org.apache.cocoon.environment.SourceResolver;
  +import org.apache.cocoon.xml.dom.DOMStreamer;
  +import org.apache.regexp.RE;
  +import org.apache.regexp.RESyntaxException;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.NodeList;
  +import org.xml.sax.InputSource;
  +import org.xml.sax.SAXException;
  +import org.xml.sax.helpers.AttributesImpl;
  +import java.io.File;
  +import java.io.IOException;
  +import java.net.URL;
  +import java.text.SimpleDateFormat;
  +import java.util.Date;
  +import java.util.Map;
  +import java.util.Stack;
  +
  +/**
  + * Generates an XML directory listing performing XPath queries
  + * on XML files. It can be used both as a plain DirectoryGenerator
  + * or, using an "xpointerinsh" syntax it will perform an XPath
  + * query on every XML resource.
  + *
  + * Sample usage:
  + *
  + * Sitemap:
  + * &lt;map:match pattern="documents/**"&gt;
  + *   &lt;map:generate type="xpathdirectory"
  + *     src="docs/{1}#/article/title|/article/abstract" /&gt;
  + *   &lt;map:serialize type="xml" /&gt;
  + * &lt;/map:match&gt;
  + *
  + * Request:
  + *   http://www.some.host/documents/test
  + * Result:
  + * &lt;dir:directory
  + *   name="test" lastModified="1010400942000"
  + *   date="1/7/02 11:55 AM" requested="true"
  + *   xmlns:dir="http://apache.org/cocoon/directory/2.0"&gt;
  + *   &lt;dir:directory name="subdirectory" lastModified="1010400942000" date="1/7/02 11:55 AM" /&gt;
  + *   &lt;dir:file name="test.xml" lastModified="1011011579000" date="1/14/02 1:32 PM"&gt;
  + *     &lt;dir:xpath docid="test.xml" query="/article/title"&gt;
  + *       &lt;title&gt;This is a test document&lt;/title&gt;
  + *       &lt;abstract&gt;
  + *         &lt;para&gt;Abstract of my test article&lt;/para&gt;
  + *       &lt;/abstract&gt;
  + *     &lt;/dir:xpath&gt;
  + *   &lt;/dir:file&gt;
  + *   &lt;dir:file name="test.gif" lastModified="1011011579000" date="1/14/02 1:32 PM"&gt;
  + * &lt;/dir:directory&gt;
  + *
  + * @author <a href="mailto:gianugo@apache.org">Gianugo Rabellino</a>
  + * @version CVS $Id: XPathDirectoryGenerator.java,v 1.2 2002/02/04 09:51:21 cziegeler Exp $
  + */
  +public class XPathDirectoryGenerator extends DirectoryGenerator {
  +
  +    /** Element &lt;result&gt; */
  +    protected static final String RESULT = "xpath";
  +    protected static final String QRESULT = PREFIX + ":" + RESULT;
  +    protected static final String RESULT_DOCID_ATTR = "docid";
  +    protected static final String QUERY_ATTR = "query";
  +
  +    protected static final String CDATA  = "CDATA";
  +    protected String XPathQuery = null;
  +    protected XPathProcessor processor = null;
  +    protected Parser parser;
  +    protected Document doc;
  +
  +    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
  +        throws ProcessingException, SAXException, IOException {
  +        super.setup(resolver, objectModel, src, par);
  +        // See if an XPath was specified
  +        int pointer;
  +        if ((pointer = this.source.indexOf("#")) != -1) {
  +          this.XPathQuery = source.substring(pointer + 1);
  +          this.source = source.substring(0, pointer);
  +          if (this.getLogger().isDebugEnabled())
  +            this.getLogger().debug("Applying XPath: " + XPathQuery
  +              + " to directory " + source);
  +        }
  +    }
  +
  +    public void compose(ComponentManager manager) {
  +      try {
  +        super.compose(manager);
  +        processor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);
  +        parser = (Parser)manager.lookup(Parser.ROLE);
  +      } catch (Exception e) {
  +        this.getLogger().error("Could not obtain a required component", e);
  +      }
  +    }
  +
  +    /**
  +     * Adds a single node to the generated document. If the path is a
  +     * directory, and depth is greater than zero, then recursive calls
  +     * are made to add nodes for the directory's children. Moreover,
  +     * if the file is an XML file (ends with .xml), the XPath query
  +     * is performed and results returned.
  +     *
  +     * @param   path
  +     *      the file/directory to process
  +     * @param   depth
  +     *      how deep to scan the directory
  +     *
  +     * @throws  SAXException
  +     *      if an error occurs while constructing nodes
  +     */
  +    protected void addPath(File path, int depth)
  +    throws SAXException {
  +        if (path.isDirectory()) {
  +            startNode(DIR_NODE_NAME, path);
  +            if (depth>0) {
  +                File contents[] = path.listFiles();
  +                for (int i=0; i<contents.length; i++) {
  +                    if (isIncluded(contents[i]) && !isExcluded(contents[i])) {
  +                        addPath(contents[i], depth-1);
  +                    }
  +                }
  +            }
  +            endNode(DIR_NODE_NAME);
  +        } else {
  +            if (isIncluded(path) && !isExcluded(path)) {
  +                startNode(FILE_NODE_NAME, path);
  +                if (path.getName().endsWith(".xml") && XPathQuery != null)
  +                  performXPathQuery(path);
  +                endNode(FILE_NODE_NAME);
  +            }
  +        }
  +    }
  +
  +    protected void performXPathQuery(File in)
  +      throws SAXException {
  +      doc = null;
  +      try {
  +        doc = parser.parseDocument(
  +          resolver.resolve(in.toURL().toExternalForm()).getInputSource());
  +      } catch (SAXException se) {
  +         this.getLogger().error("Warning:" + in.getName()
  +          + " is not a valid XML file. Ignoring");
  +      } catch (Exception e) {
  +         this.getLogger().error("Unable to resolve and parse file" + e);
  +       }
  +       if (doc != null) {
  +         NodeList nl = processor.selectNodeList(doc.getDocumentElement(), XPathQuery);
  +         final String id = in.getName();
  +         AttributesImpl attributes = new AttributesImpl();
  +         attributes.addAttribute("", RESULT_DOCID_ATTR, RESULT_DOCID_ATTR,
  +           CDATA, id);
  +         attributes.addAttribute("", QUERY_ATTR, QUERY_ATTR, CDATA,
  +           XPathQuery);
  +         super.contentHandler.startElement(URI, RESULT, QRESULT, attributes);
  +         DOMStreamer ds = new DOMStreamer(super.xmlConsumer);
  +         for (int i = 0; i < nl.getLength(); i++)
  +           ds.stream(nl.item(i));
  +         super.contentHandler.endElement(URI, RESULT, QRESULT);
  +      }
  +    }
  +
  +    /**
  +     * Recycle resources
  +     *
  +     */
  +   public void recycle() {
  +      super.recycle();
  +      this.XPathQuery = null;
  +      this.attributes = null;
  +      this.doc = null;
  +    }
  +}
  +
  
  
  
  1.7       +60 -14    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/jispstore/MRUMemoryStore.java
  
  Index: MRUMemoryStore.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/jispstore/MRUMemoryStore.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MRUMemoryStore.java	2 Feb 2002 02:42:40 -0000	1.6
  +++ MRUMemoryStore.java	4 Feb 2002 09:51:21 -0000	1.7
  @@ -1,11 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  -
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.jispstore;
   
   import org.apache.avalon.framework.activity.Disposable;
  @@ -71,7 +117,7 @@
           }
   
           getLogger().debug("Object not found in memory");
  -        
  +
           tmpobject = this.mFsstore.get(key);
           if (tmpobject == null) {
               if (getLogger().isDebugEnabled()) {
  @@ -100,11 +146,11 @@
           throws ComponentException {
           this.mComponetManager = manager;
           if (getLogger().isDebugEnabled()) {
  -            getLogger().debug("Looking up " 
  +            getLogger().debug("Looking up "
                                  + Store.ROLE + "/JispFilesystemStore");
           }
   
  -        this.mFsstore = (Store) manager.lookup(Store.ROLE 
  +        this.mFsstore = (Store) manager.lookup(Store.ROLE
                                                  + "/JispFilesystemStore");
           if (getLogger().isDebugEnabled()) {
               getLogger().debug("Looking up " + StoreJanitor.ROLE);
  @@ -191,7 +237,7 @@
           while (this.mMRUList.size() >= this.mMaxobjects) {
               this.free();
           }
  -      
  +
           this.mCache.put(key, value);
           this.mMRUList.remove(key);
           this.mMRUList.addFirst(key);
  @@ -247,10 +293,10 @@
           try {
               if (this.mCache.size() > 0) {
                   this.getLogger().debug("Freeing cache");
  -                
  +
                   if(checkSerializable(this.mCache.get(this.mMRUList.getLast()))) {
                       this.mFsstore.store(this.mMRUList.getLast(),
  -                                        this.mCache.get(this.mMRUList.getLast()));     
  +                                        this.mCache.get(this.mMRUList.getLast()));
                   }
   
                   this.mCache.remove(this.mMRUList.getLast());
  
  
  
  1.2       +57 -11    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/jispstore/StoreJanitorImpl.java
  
  Index: StoreJanitorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/jispstore/StoreJanitorImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StoreJanitorImpl.java	15 Jan 2002 18:16:16 -0000	1.1
  +++ StoreJanitorImpl.java	4 Feb 2002 09:51:21 -0000	1.2
  @@ -1,11 +1,57 @@
  -/*****************************************************************************
  - * 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.                                                         *
  - *****************************************************************************/
  -
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.jispstore;
   
   import org.apache.avalon.framework.activity.Startable;
  @@ -59,7 +105,7 @@
        * @param params the Configuration of the application
        * @exception ConfigurationException
        */
  -    public void parameterize(Parameters params) 
  +    public void parameterize(Parameters params)
           throws ParameterException {
           if (this.getLogger().isDebugEnabled() == true) {
               this.getLogger().debug("Configure StoreJanitorImpl");
  @@ -183,7 +229,7 @@
   
       /**
        * This method return a java.util.Iterator of every registered stores
  -     * 
  +     *
        * <i>The iterators returned is fail-fast: if list is structurally
        * modified at any time after the iterator is created, in any way, the
        * iterator will throw a ConcurrentModificationException.  Thus, in the
  @@ -196,7 +242,7 @@
       public Iterator iterator() {
           return this.getStoreList().iterator();
        }
  -     
  +
       /**
        * Round Robin alghorithm for freeing the registerd caches.
        */
  
  
  

----------------------------------------------------------------------
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