cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback XIncludeCallBack.java
Date Tue, 25 Jun 2002 13:35:08 GMT
bloritsch    2002/06/25 06:35:08

  Modified:    src/java/org/apache/cocoon/components/language/generator
                        GeneratorSelector.java
               src/java/org/apache/cocoon/components/validation/schematron
                        SchematronFactory.java SchematronValidator.java
                        ValidationResult.java
  Added:       src/scratchpad/src/org/apache/cocoon/callback
                        XIncludeCallBack.java
  Log:
  Change the name of the variable 'assert' because it is a keyword in JDK 1.4
  
  Revision  Changes    Path
  1.11      +2 -2      xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java
  
  Index: GeneratorSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- GeneratorSelector.java	4 Jun 2002 07:11:26 -0000	1.10
  +++ GeneratorSelector.java	25 Jun 2002 13:35:07 -0000	1.11
  @@ -162,7 +162,7 @@
               return component;
           } catch (Exception ce) {
               getLogger().debug("Could not access component for hint: " + hint, ce);
  -            throw new ComponentException("Could not access component for hint: " + hint,
null);
  +            throw new ComponentException("Could not access component for hint: " + hint,
ce);
           }
       }
   
  
  
  
  1.7       +11 -11    xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java
  
  Index: SchematronFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SchematronFactory.java	16 Jun 2002 05:57:42 -0000	1.6
  +++ SchematronFactory.java	25 Jun 2002 13:35:07 -0000	1.7
  @@ -288,20 +288,20 @@
       for (int i = 1; i <= elementCount; i++)
       {
         logger.debug( "Assert# :  " + i);
  -      Assert assert = new Assert();
  +      Assert assertion = new Assert();
         String assertPrefix = pathPrefix + "/assert[" + i + "]";
   
         String test = (String) jxpContext.getValue ( assertPrefix + "/@test", String.class
);
  -      assert.setTest( test );
  -      logger.debug( "Assert test :  " + assert.getTest());
  +      assertion.setTest( test );
  +      logger.debug( "Assert test :  " + assertion.getTest());
   
   
         // since diagnostics is a non-mandatory element
         // we will try to get its value in a lenient mode
         jxpContext.setLenient(true);
         String diagnostics = (String) jxpContext.getValue ( assertPrefix + "/@diagnostics",
String.class );
  -      assert.setDiagnostics( diagnostics );
  -      logger.debug( "Assert diagnostics :  " + assert.getDiagnostics());
  +      assertion.setDiagnostics( diagnostics );
  +      logger.debug( "Assert diagnostics :  " + assertion.getDiagnostics());
         jxpContext.setLenient(false);
   
         
  @@ -316,10 +316,10 @@
         // convery DOMNode to String
   
         String message = (String) jxpContext.getValue ( assertPrefix, String.class );
  -      assert.setMessage( message );
  -      logger.debug( "Assert message :  " + assert.getMessage());
  +      assertion.setMessage( message );
  +      logger.debug( "Assert message :  " + assertion.getMessage());
   
  -      rule.addAssert( assert );
  +      rule.addAssert( assertion );
       }
     }
   
  
  
  
  1.3       +6 -6      xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronValidator.java
  
  Index: SchematronValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/SchematronValidator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SchematronValidator.java	2 Jun 2002 03:33:35 -0000	1.2
  +++ SchematronValidator.java	25 Jun 2002 13:35:07 -0000	1.3
  @@ -357,13 +357,13 @@
         Iterator assertIter = rule.getAssert().iterator();
         while (assertIter.hasNext())
         {
  -        Assert assert = (Assert) assertIter.next();
  +        Assert assertion = (Assert) assertIter.next();
           // if an assert test fails, then it should be added
           // to the result
  -        boolean passed = evalTest( localJxpContext, assert.getTest() );
  +        boolean passed = evalTest( localJxpContext, assertion.getTest() );
           if (!passed) 
           {
  -          nextFailedRule.addAssert ( assert );
  +          nextFailedRule.addAssert ( assertion );
           }
         }
         
  
  
  
  1.3       +6 -6      xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/ValidationResult.java
  
  Index: ValidationResult.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/validation/schematron/ValidationResult.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ValidationResult.java	2 Jun 2002 03:33:35 -0000	1.2
  +++ ValidationResult.java	25 Jun 2002 13:35:07 -0000	1.3
  @@ -147,14 +147,14 @@
           Iterator assertIter = rule.getAssert().iterator();
           while (assertIter.hasNext ())
           {
  -          Assert assert = (Assert)assertIter.next ();
  +          Assert assertion = (Assert)assertIter.next ();
   
             // add the next assert to the violations set
             Violation v = new Violation();
             v.setPath( rule.getContext() );
  -          v.setMessage( assert.getMessage() );
  +          v.setMessage( assertion.getMessage() );
             violations.add( v );
  -          // System.out.println("        Assert test: " + assert.getTest() + ", message:
" + assert.getMessage() );
  +          // System.out.println("        Assert test: " + assertion.getTest() + ", message:
" + assertion.getMessage() );
           }
   
           Iterator reportIter = rule.getReport().iterator();
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/callback/XIncludeCallBack.java
  
  Index: XIncludeCallBack.java
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, 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 (INCLU-
   DING, 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 and was  originally created by
   Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache
   Software Foundation, please see <http://www.apache.org/>.
  
  */
  package org.apache.cocoon.callback;
  
  import org.apache.avalon.framework.parameters.Parameters;
  import org.apache.avalon.framework.component.*;
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  
  /**
   * The XIncludeCallBack processes XInclude directives in an event format.
   *
   * TODO: SHould this include a reference to the Environment?
   *
   * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
   * @version $Id: XIncludeCallBack.java,v 1.1 2002/06/25 13:35:07 bloritsch Exp $
   */
  public final class XIncludeCallBack extends AbstractLogEnabled implements XMLCallBack, Composable
  {
      private ComponentManager m_manager;
  
      public XMLSource getFragment( Parameters paramList )
      {
          String href = paramList.getParameter( "href", null );
          String base = paramList.getParameter( "base", null );
          String parse = paramList.getParameter( "parse", null );
  
          boolean asXML = "text".equals( parse );
  
          return null;
      }
  
      public void compose( ComponentManager manager )
      {
          m_manager = manager;
      }
  }
  
  
  
  
  
  

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