commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser XMLParser.java
Date Tue, 25 Jun 2002 19:12:29 GMT
jstrachan    2002/06/25 12:12:29

  Modified:    jelly/src/java/org/apache/commons/jelly/tags/define
                        DefineTagLibrary.java DynamicTagLibrary.java
                        DefineTagTag.java DynamicTag.java
               jelly/src/java/org/apache/commons/jelly/tags/http
                        MethodSupportTag.java
               jelly    build.xml
               jelly/src/java/org/apache/commons/jelly/impl StaticTag.java
                        TextScript.java
               jelly/src/test/org/apache/commons/jelly/define
                        TestDynamicTags.java
               jelly/src/java/org/apache/commons/jelly/parser
                        XMLParser.java
  Added:       jelly/src/java/org/apache/commons/jelly/tags/define
                        BeanTag.java DefineTagSupport.java
                        DefineJellyBeanTag.java
               jelly/src/java/org/apache/commons/jelly/impl
                        StaticTagScript.java
               jelly/src/test/org/apache/commons/jelly/google
                        defineTags.jelly search.jelly
               jelly/src/test/org/apache/commons/jelly/define
                        jellyBeanSample.jelly MyRunnable.java
  Log:
  Added support for dynamic jelly beans. These are similar to <taskdef> in Ant
  but in this case any Java Bean can be bound to a Jelly tag then any 'invoke' method can be called.
  
  So for example any Runnable object can be dynamically bound into a dynamic tag library and invoked as a tag.
  The method could be run(), invoke(), execute() or whatever. 
  The Jexl and tag attributes can set all the properties of the bean.
  
  So dynamic tag libraries can now be defined using regular beans or via jelly script.
  One more dynamic tag that uses a static method might be interesting to do...
  
  Revision  Changes    Path
  1.4       +6 -5      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineTagLibrary.java
  
  Index: DefineTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineTagLibrary.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefineTagLibrary.java	17 May 2002 15:18:12 -0000	1.3
  +++ DefineTagLibrary.java	25 Jun 2002 19:12:28 -0000	1.4
  @@ -74,6 +74,7 @@
       public DefineTagLibrary() {
           registerTag( "taglib", DefineTagLibTag.class );
           registerTag( "tag", DefineTagTag.class );
  +        registerTag( "jellybean", DefineJellyBeanTag.class );
           registerTag( "invokeBody", InvokeBodyTag.class );
           registerTag( "script", DefineScriptTag.class );
       }
  
  
  
  1.5       +37 -7     jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DynamicTagLibrary.java
  
  Index: DynamicTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DynamicTagLibrary.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DynamicTagLibrary.java	17 May 2002 15:18:12 -0000	1.4
  +++ DynamicTagLibrary.java	25 Jun 2002 19:12:28 -0000	1.5
  @@ -64,7 +64,9 @@
   import java.util.HashMap;
   import java.util.Map;
   
  +import org.apache.commons.jelly.DynaTag;
   import org.apache.commons.jelly.Script;
  +import org.apache.commons.jelly.Tag;
   import org.apache.commons.jelly.TagLibrary;
   import org.apache.commons.jelly.impl.DynaTagScript;
   import org.apache.commons.jelly.impl.TagScript;
  @@ -93,14 +95,35 @@
       /** Creates a new script to execute the given tag name and attributes */
       public TagScript createTagScript(String name, Attributes attributes)
           throws Exception {
  -        Script template = (Script) templates.get(name);
  -        if (template != null) {
  +
  +        Object value = templates.get(name);
  +        if ( value instanceof Script ) {            
  +            Script template = (Script) value;
               DynamicTag tag = new DynamicTag(template);
   
               // XXXX: somehow we should find the template's 
               // <invokeBody> tag and associate it with this instance
               return new DynaTagScript(tag);
           }
  +        else if ( value instanceof DynaTag ) {
  +            DynaTag tag = (DynaTag) value;
  +            return new DynaTagScript(tag);
  +        }
  +        return null;
  +    }
  +
  +    /** Creates a new Tag for the given tag name if it exists */
  +    public Tag createTag(String name)
  +        throws Exception {
  +
  +        Object value = templates.get(name);
  +        if ( value instanceof Script ) {            
  +            Script template = (Script) value;
  +            return new DynamicTag(template);
  +        }
  +        else if ( value instanceof DynaTag ) {
  +            return (DynaTag) value;
  +        }
           return null;
       }
   
  @@ -109,6 +132,13 @@
        */
       public void registerDynamicTag(String name, Script template) {
           templates.put(name, template);
  +    }
  +
  +    /**
  +     * Creates a new Jelly Bean Tag with the given name 
  +     */
  +    public void registerBeanTag(String name, BeanTag tag) {
  +        templates.put(name, tag);
       }
   
       // Properties
  
  
  
  1.5       +7 -14     jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineTagTag.java
  
  Index: DefineTagTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineTagTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefineTagTag.java	17 May 2002 15:18:12 -0000	1.4
  +++ DefineTagTag.java	25 Jun 2002 19:12:28 -0000	1.5
  @@ -61,9 +61,7 @@
    */
   package org.apache.commons.jelly.tags.define;
   
  -import org.apache.commons.jelly.JellyContext;
   import org.apache.commons.jelly.JellyException;
  -import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
   /** 
  @@ -73,7 +71,7 @@
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  -public class DefineTagTag extends TagSupport {
  +public class DefineTagTag extends DefineTagSupport {
       
       private String name;
       
  @@ -83,12 +81,7 @@
       // Tag interface
       //-------------------------------------------------------------------------                    
       public void doTag(XMLOutput output) throws Exception {
  -        DefineTagLibTag tag 
  -            = (DefineTagLibTag) findAncestorWithClass(this, DefineTagLibTag.class);
  -        if ( tag == null ) {
  -            throw new JellyException( "<define:tag> must be inside <define:taglib>" );
  -        }
  -        tag.getTagLibrary().registerDynamicTag( getName(), getBody() );
  +        getTagLibrary().registerDynamicTag( getName(), getBody() );
       }    
       
       // Properties
  
  
  
  1.8       +9 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DynamicTag.java
  
  Index: DynamicTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DynamicTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DynamicTag.java	17 May 2002 15:18:12 -0000	1.7
  +++ DynamicTag.java	25 Jun 2002 19:12:28 -0000	1.8
  @@ -104,8 +104,11 @@
       // Tag interface
       //-------------------------------------------------------------------------                    
       public void doTag(XMLOutput output) throws Exception {
  -        log.info("Invoking dynamic tag with attributes: " + attributes);
  +        if ( log.isDebugEnabled() ) {
  +            log.debug("Invoking dynamic tag with attributes: " + attributes);
  +        }
           attributes.put("org.apache.commons.jelly.body", getBody());
  +        
           // create new context based on current attributes
           JellyContext newJellyContext = context.newJellyContext(attributes);
           getTemplate().run(newJellyContext, output);
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/BeanTag.java
  
  Index: BeanTag.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DynamicTag.java,v 1.7 2002/05/17 15:18:12 jstrachan Exp $
   * $Revision: 1.7 $
   * $Date: 2002/05/17 15:18:12 $
   *
   * ====================================================================
   *
   * 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
   * 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 acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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/>.
   * 
   * $Id: DynamicTag.java,v 1.7 2002/05/17 15:18:12 jstrachan Exp $
   */
  package org.apache.commons.jelly.tags.define;
  
  import java.lang.reflect.Method;
  import java.util.HashMap;
  import java.util.Map;
  
  import org.apache.commons.beanutils.ConvertingWrapDynaBean;
  
  import org.apache.commons.jelly.DynaBeanTagSupport;
  import org.apache.commons.jelly.JellyContext;
  import org.apache.commons.jelly.Script;
  import org.apache.commons.jelly.TagSupport;
  import org.apache.commons.jelly.XMLOutput;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  /** 
   * This tag is bound onto a Java Bean class. When the tag is invoked a bean will be created
   * using the tags attributes. 
   * The bean may also have an invoke method called invoke(), run(), execute() or some such method
   * which will be invoked after the bean has been configured.</p>
   *
   * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
   * @version $Revision: 1.7 $
   */
  public class BeanTag extends DynaBeanTagSupport {
  
      /** The Log to which logging calls will be made. */
      private static final Log log = LogFactory.getLog(BeanTag.class);
  
      /** Empty arguments for Method.invoke() */
      private static final Object[] emptyArgs = {};
      
      /** the bean class */
      private Class beanClass;
      
      /** the current bean instance */
      private Object bean;
      
      /** the method to invoke on the bean */
      private Method method;    
  
  
      public BeanTag(Class beanClass, Method method) {
          this.beanClass = beanClass;
          this.method = method;
      }
  
      public void beforeSetAttributes() throws Exception {
          // create a new dynabean before the attributes are set
          bean = beanClass.newInstance();
          setDynaBean( new ConvertingWrapDynaBean( bean ) );
      }
  
      // Tag interface
      //-------------------------------------------------------------------------                    
      public void doTag(XMLOutput output) throws Exception {
          invokeBody(output);
          
          // now, I may invoke the 'execute' method if I have one
          if ( method != null ) {
              method.invoke( bean, emptyArgs );
          }
      }
      
      // Properties
      //-------------------------------------------------------------------------                    
      /**
       * @return the bean that has just been created 
       */
      public Object getBean() {
          return bean;
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineTagSupport.java
  
  Index: DefineTagSupport.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/taglibs/beanshell/src/java/org/apache/commons/jelly/tags/beanshell/BeanShellExpressionFactory.java,v 1.1 2002/05/21 07:58:55 jstrachan Exp $
   * $Revision: 1.1 $
   * $Date: 2002/05/21 07:58:55 $
   *
   * ====================================================================
   *
   * 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
   * 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 acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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/>.
   * 
   * $Id: BeanShellExpressionFactory.java,v 1.1 2002/05/21 07:58:55 jstrachan Exp $
   */
  
  package org.apache.commons.jelly.tags.define;
  
  import org.apache.commons.jelly.JellyException;
  import org.apache.commons.jelly.TagSupport;
  
  /** 
   * An abstract base class useful for implementation inheritence.
   * 
   * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
   * @version $Revision: 1.1 $
   */
  public abstract class DefineTagSupport extends TagSupport {
  
      // Implementation methods
      //-------------------------------------------------------------------------                    
      
      /**
       * @return the current dynamic tag library instance or throws a JellyException
       * if one is not available
       */
      protected DynamicTagLibrary getTagLibrary() throws JellyException {
          DefineTagLibTag tag 
              = (DefineTagLibTag) findAncestorWithClass(DefineTagLibTag.class);
          if ( tag == null ) {
              throw new JellyException( "<define:tag> must be inside <define:taglib>" );
          }
          return tag.getTagLibrary();
      }
      
  }
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/define/DefineJellyBeanTag.java
  
  Index: DefineJellyBeanTag.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/taglibs/beanshell/src/java/org/apache/commons/jelly/tags/beanshell/BeanShellExpressionFactory.java,v 1.1 2002/05/21 07:58:55 jstrachan Exp $
   * $Revision: 1.1 $
   * $Date: 2002/05/21 07:58:55 $
   *
   * ====================================================================
   *
   * 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
   * 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 acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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/>.
   * 
   * $Id: BeanShellExpressionFactory.java,v 1.1 2002/05/21 07:58:55 jstrachan Exp $
   */
  
  package org.apache.commons.jelly.tags.define;
  
  import java.lang.reflect.Method;
  
  import org.apache.commons.beanutils.MethodUtils;
  
  import org.apache.commons.jelly.JellyException;
  import org.apache.commons.jelly.MissingAttributeException;
  import org.apache.commons.jelly.XMLOutput;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  
  /** 
   * Binds a Java bean to the given named Jelly tag so that the attributes of
   * the tag set the bean properties. After the body of this tag is invoked
   * then the beans invoke() method will be called, if the bean has one.
   * 
   * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
   * @version $Revision: 1.1 $
   */
  public class DefineJellyBeanTag extends DefineTagSupport {
  
      /** The Log to which logging calls will be made. */
      private static final Log log = LogFactory.getLog(DefineJellyBeanTag.class);
  
      /** Empty parameter types for Method lookup */
      private static final Class[] emptyParamTypes = {};
      
      /** the name of the tag to create */
      private String name;
      
      /** the Java class name to use for the tag */
      private String className;
  
      /** the ClassLoader used to load beans */
      private ClassLoader classLoader;
      
      /** the name of the method to invoke on the bean */
      private String method;
      
      // Tag interface
      //-------------------------------------------------------------------------                    
      public void doTag(XMLOutput output) throws Exception {
  		if (name == null) {
  			throw new MissingAttributeException("name");
  		}
  		if (className == null) {
  			throw new MissingAttributeException("className");
  		}
          
  		Class theClass = null;
  		try {
  			ClassLoader classLoader = getClassLoader();
  			theClass = classLoader.loadClass(className);
  		} 
  		catch (ClassNotFoundException e) {
  			try {
  				theClass = getClass().getClassLoader().loadClass(className);
  			} 
              catch (ClassNotFoundException e2) {
  				try {
  					theClass = Class.forName(className);
  				} 
                  catch (ClassNotFoundException e3) {
                      log.error( "Could not load class: " + className + " exception: " + e, e );
  					throw new JellyException(
  						"Could not find class: "
  							+ className
  							+ " using ClassLoader: "
  							+ classLoader);
  				}
  			}
  		}
  
  		Method invokeMethod =
  			MethodUtils.getAccessibleMethod(
  				theClass,
  				getMethod(),
  				emptyParamTypes);
  
  		BeanTag tag = new BeanTag(theClass, invokeMethod);
  		getTagLibrary().registerBeanTag(name, tag);
  	}
  
      
      // Properties
      //-------------------------------------------------------------------------                    
      
      /** 
       * Sets the name of the tag to create
       */
      public void setName(String name) {
          this.name = name;
      }
      
      /** 
       * Sets the Java class name to use for the tag
       */
      public void setClassName(String className) {
          this.className = className;
      }
      
      /**
       * @return the method name to use, which defaults to 'run' for Runnable
       * objects
       */
      public String getMethod() {
          if ( method == null ) {
              return "run";
          }
          return method;
      }
      
      /** 
       * Sets the name of the method to invoke on the bean. 
       * This defaults to "run" so that Runnable objects can be
       * invoked, but this property can be set to whatever is required,
       * such as "execute" or "invoke"
       */
      public void setMethod(String method) {
          this.method = method;
      }
      
      /**
       * Sets the ClassLoader to use to load the class. 
       * If no value is set then the current threads context class
       * loader is used.
       */
      public void setClassLoader(ClassLoader classLoader) {
          this.classLoader = classLoader;
      }
  
      /**
       * @return the ClassLoader to use to load classes
       *  or will use the thread context loader if none is specified.
       */    
      public ClassLoader getClassLoader() {
          if ( classLoader == null ) {
              ClassLoader answer = Thread.currentThread().getContextClassLoader();
              if ( answer == null ) {
                  answer = getClass().getClassLoader();
              }
              return answer;
          }
          return classLoader;
      }
  }
  
  
  
  1.2       +18 -3     jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/http/MethodSupportTag.java
  
  Index: MethodSupportTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/http/MethodSupportTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MethodSupportTag.java	24 Jun 2002 11:17:09 -0000	1.1
  +++ MethodSupportTag.java	25 Jun 2002 19:12:29 -0000	1.2
  @@ -81,7 +81,7 @@
    */
   public abstract class MethodSupportTag extends TagSupport {
   
  -    /** The variable name to create */
  +    /** The variable name to create the HttpMethod object */
       private String var;
           
       /** Sets the URL of this request */
  @@ -103,6 +103,21 @@
       // Tag interface
       //-------------------------------------------------------------------------                    
       public void doTag(XMLOutput output) throws Exception {        
  +        // ### should probably use HttpClient instead
  +/*
  +        HttpClient client = getHttpClient();
  +        client.startSession( getUrl() );
  +        
  +        try {
  +            // must use inner tags to extract the output....
  +            getBody().run(context, output)
  +        }
  +        finally {
  +            client.endSession();
  +        }
  +        
  +*/        
  +         
           HttpConnection connection = getConnection();
           if ( connection == null ) {
               throw new JellyException( 
  @@ -119,7 +134,7 @@
           int result = method.execute(getState(), connection);
   
           if ( var != null ) {
  -            context.setVariable(var, new Integer(result));
  +            context.setVariable(var, method);
           }
       }
       
  @@ -181,7 +196,7 @@
           this.connectionManager = connectionManager;
       }    
       
  -    /** Sets the variable name for the http status output
  +    /** Sets the variable name for the HttpMethod object 
        * 
        * @jelly:optional
         */
  
  
  
  1.56      +22 -0     jakarta-commons-sandbox/jelly/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/build.xml,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- build.xml	23 Jun 2002 01:29:34 -0000	1.55
  +++ build.xml	25 Jun 2002 19:12:29 -0000	1.56
  @@ -247,6 +247,8 @@
       <mkdir dir="target/generated-xdocs"/>
   	<jelly file="src/script/makeTagDoc.jelly" output="target/generated-xdocs/tags.xml"/> 
      </target>
  +
  +
   <!-- ========== Specific Test cases ======================================= -->
   
      <target name="test.expr"
  @@ -267,6 +269,12 @@
       <maven-ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
      </target>
   
  +   <target name="test.define"
  +      description="Runs the Define unit test">
  +    <property name="maven.testcase" value="org.apache.commons.jelly.define.TestDynamicTags"/>   
  +    <maven-ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
  +   </target>
  +
   
   <!-- ========== Sample Program Targets ==================================== -->
   
  @@ -325,6 +333,20 @@
         
   	<property name="inputFile" value="src/test/org/apache/commons/jelly/xml/betwixt/input.xml"/>	
   	<jelly file="src/test/org/apache/commons/jelly/xml/betwixt/makeBetwixt.jelly" output="target/PO.betwixt"/> 
  +	
  +   </target>
  +
  +   <target name="demo.jellybean" depends="compile" 
  +      description="Runs a demo showing the use of jellybean tags, beans with a run() method">
  +<!--      
  +	<jelly file="src/test/org/apache/commons/jelly/define/jellyBeanSample.jelly"/> 
  +	
  +-->
  +	
  +    <java classname="org.apache.commons.jelly.Jelly" fork="yes">
  +      <classpath refid="test.classpath"/>
  +      <arg value="src/test/org/apache/commons/jelly/define/jellyBeanSample.jelly"/> 
  +    </java>
   	
      </target>
   
  
  
  
  1.7       +7 -7      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/StaticTag.java
  
  Index: StaticTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/StaticTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StaticTag.java	18 Jun 2002 08:37:02 -0000	1.6
  +++ StaticTag.java	25 Jun 2002 19:12:29 -0000	1.7
  @@ -129,11 +129,11 @@
       
       // Properties
       //-------------------------------------------------------------------------                    
  -    public String getURI() {
  +    public String getUri() {
           return uri;
       }
       
  -    public void setURI(String uri) {
  +    public void setUri(String uri) {
           this.uri = uri;
       }
       
  
  
  
  1.8       +8 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TextScript.java
  
  Index: TextScript.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TextScript.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TextScript.java	18 Jun 2002 18:36:42 -0000	1.7
  +++ TextScript.java	25 Jun 2002 19:12:29 -0000	1.8
  @@ -146,6 +146,8 @@
   
       /** Evaluates the body of a tag */
       public void run(JellyContext context, XMLOutput output) throws Exception {
  -        output.write(text);
  +        if ( text != null ) {
  +            output.write(text);
  +        }
       }
   }
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/StaticTagScript.java
  
  Index: StaticTagScript.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/DynaTagScript.java,v 1.8 2002/06/25 17:10:07 jstrachan Exp $
   * $Revision: 1.8 $
   * $Date: 2002/06/25 17:10:07 $
   *
   * ====================================================================
   *
   * 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
   * 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 acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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/>.
   *
   * $Id: DynaTagScript.java,v 1.8 2002/06/25 17:10:07 jstrachan Exp $
   */
  package org.apache.commons.jelly.impl;
  
  import java.util.Iterator;
  import java.util.Map;
  
  import org.apache.commons.jelly.CompilableTag;
  import org.apache.commons.jelly.JellyContext;
  import org.apache.commons.jelly.Script;
  import org.apache.commons.jelly.Tag;
  import org.apache.commons.jelly.DynaTag;
  import org.apache.commons.jelly.DynaBeanTagSupport;
  import org.apache.commons.jelly.TagLibrary;
  import org.apache.commons.jelly.XMLOutput;
  import org.apache.commons.jelly.expression.Expression;
  import org.apache.commons.jelly.tags.define.DynamicTagLibrary;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  /** 
   * <p><code>StaticTagScript</code> is a script that evaluates a StaticTag, a piece of static XML
   * though its attributes or element content may contain dynamic expressions.
   * The first time this tag evaluates, it may have become a dynamic tag, so it will check that
   * a new dynamic tag has not been generated.</p>
   *
   * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
   * @version $Revision: 1.8 $
   */
  public class StaticTagScript extends DynaTagScript {
  
      /** The Log to which logging calls will be made. */
      private static final Log log = LogFactory.getLog(StaticTagScript.class);
  
      private boolean firstRun = true;
      
      public StaticTagScript() {
      }
  
      public StaticTagScript(StaticTag tag) {
          super(tag);
      }
  
      // Script interface
      //-------------------------------------------------------------------------                
      /** Evaluates the body of a tag */
      public void run(JellyContext context, XMLOutput output) throws Exception {
  
          if ( firstRun ) {
              firstRun = false;
              
              // lets see if we have a dynamic tag
              tag = findDynamicTag(context, (StaticTag) tag);
          }
          tag.setContext(context);
          
          DynaTag dynaTag = (DynaTag) tag;
  
          // ### probably compiling this to 2 arrays might be quicker and smaller
          for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) {
              Map.Entry entry = (Map.Entry) iter.next();
              String name = (String) entry.getKey();
              Expression expression = (Expression) entry.getValue();
  
              Object value = expression.evaluate(context);
              dynaTag.setAttribute(name, value);
          }
          
          runTag(output);
      }
  
      /**
       * Attempts to find a dynamically created tag that has been created since this
       * script was compiled
       */    
      protected Tag findDynamicTag(JellyContext context, StaticTag tag) throws Exception {
          // lets see if there's a tag library for this URI...
          TagLibrary taglib = context.getTagLibrary( tag.getUri() );
          if ( taglib instanceof DynamicTagLibrary ) {
              DynamicTagLibrary dynaLib = (DynamicTagLibrary) taglib;
              Tag newTag = dynaLib.createTag( tag.getLocalName() );
              if ( newTag != null ) {
                  newTag.setParent( tag.getParent() );
                  newTag.setBody( tag.getBody() );
                  return newTag;
              }
          }
          return tag;
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/google/defineTags.jelly
  
  Index: defineTags.jelly
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- defines a new taglib of babelfish soap services -->
  
  <j:jelly xmlns:j="jelly:core" xmlns:define="jelly:define" xmlns:http="jelly:http">
    <define:taglib uri="jelly:babelfish">  
  
  
      <!-- defines the <search> tag  -->
      <define:tag name="search">
        <j:if test="${key == null}">
        	<j:set var="key" value="00000000000"/>
        </j:if>      
        <http:post url="http://www.google.com/soap">
         <http:header name="SOAPAction" value="urn:GoogleSearch"/>
         <http:header name="Content-Type" value="text/xml"/>
         <http:body>
  		<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  		  <SOAP-ENV:Body>
  		    <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch" 
  		         SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  		      <key xsi:type="xsd:string">${googleKey}</key>
  		      <q xsi:type="xsd:string">${query}</q>
  		      <start xsi:type="xsd:int">0</start>
  		      <maxResults xsi:type="xsd:int">10</maxResults>
  		      <filter xsi:type="xsd:boolean">true</filter>
  		      <restrict xsi:type="xsd:string"></restrict>
  		      <safeSearch xsi:type="xsd:boolean">false</safeSearch>
  		      <lr xsi:type="xsd:string"></lr>
  		      <ie xsi:type="xsd:string">latin1</ie>
  		      <oe xsi:type="xsd:string">latin1</oe>
  		    </ns1:doGoogleSearch>
  		  </SOAP-ENV:Body>
  		</SOAP-ENV:Envelope>
         </http:body>
        </http:post>
      </define:tag>
      
    </define:taglib>    
  </j:jelly>
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/google/search.jelly
  
  Index: search.jelly
  ===================================================================
  <?xml version='1.0' encoding='UTF-8'?>
  <j:jelly xmlns:j="jelly:core" xmlns:http="jelly:http">
  
  <http:post uri="http://api.google.com/search/beta2">
  <http:body>
  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
      <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch" 
           SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <key xsi:type="xsd:string">${googleKey}</key>
        <q xsi:type="xsd:string">jelly java xml</q>
        <start xsi:type="xsd:int">0</start>
        <maxResults xsi:type="xsd:int">10</maxResults>
        <filter xsi:type="xsd:boolean">true</filter>
        <restrict xsi:type="xsd:string"></restrict>
        <safeSearch xsi:type="xsd:boolean">false</safeSearch>
        <lr xsi:type="xsd:string"></lr>
        <ie xsi:type="xsd:string">latin1</ie>
        <oe xsi:type="xsd:string">latin1</oe>
      </ns1:doGoogleSearch>
    </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
  </http:body>
  </http:post>
  
  </j:jelly>
  
  
  1.6       +17 -6     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/define/TestDynamicTags.java
  
  Index: TestDynamicTags.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/define/TestDynamicTags.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestDynamicTags.java	21 May 2002 07:59:32 -0000	1.5
  +++ TestDynamicTags.java	25 Jun 2002 19:12:29 -0000	1.6
  @@ -90,7 +90,6 @@
   
       XMLParser parser = new XMLParser();
       XMLOutput output;
  -    StringWriter buffer = new StringWriter();
   
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(TestDynamicTags.class);
  @@ -108,9 +107,21 @@
       }
   
       public void testParse() throws Exception {
  +        StringWriter buffer = new StringWriter();        
           output = XMLOutput.createXMLOutput(buffer);
  +        
           runScript("src/test/org/apache/commons/jelly/define/babelfishTaglib.jelly");
           runScript("src/test/org/apache/commons/jelly/define/example.jelly");
  +        
  +        log.info("The output was as follows");
  +        log.info(buffer.toString());
  +    }
  +    
  +    public void testJellyBean() throws Exception {
  +        StringWriter buffer = new StringWriter();        
  +        output = XMLOutput.createXMLOutput(buffer);
  +        
  +        runScript("src/test/org/apache/commons/jelly/define/jellyBeanSample.jelly");
           
           log.info("The output was as follows");
           log.info(buffer.toString());
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/define/jellyBeanSample.jelly
  
  Index: jellyBeanSample.jelly
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- uses the babelfish taglib -->
  <j:jelly 
  	xmlns:j="jelly:core" 
  	xmlns:define="jelly:define" 
  	xmlns:log="jelly:log" 
  	xmlns:my="myDummyTagLib">
  	
  <testcase>
  
    <log:info>Lets define a new tag library</log:info>
    
    <define:taglib uri="myDummyTagLib">  
      <define:jellybean name="foo" className="org.apache.commons.jelly.define.MyRunnable"/>
    </define:taglib>
  
    <log:info>Now lets invoke the new Jelly bean tag</log:info>
    
    <my:foo x="2" y="cheese"/>
  
    <log:info>Did that work?</log:info>
    
  </testcase>
    		
  </j:jelly>
  
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/define/MyRunnable.java
  
  Index: MyRunnable.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/TestCoreTags.java,v 1.8 2002/05/28 07:20:06 jstrachan Exp $
   * $Revision: 1.8 $
   * $Date: 2002/05/28 07:20:06 $
   *
   * ====================================================================
   *
   * 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
   * 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 acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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/>.
   * 
   * $Id: TestCoreTags.java,v 1.8 2002/05/28 07:20:06 jstrachan Exp $
   */
  package org.apache.commons.jelly.define;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  /** 
   * An example Runnable bean that is framework neutral and just performs
   * some useful function.
   *
   * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
   * @version $Revision: 1.8 $
   */
  public class MyRunnable implements Runnable {
  
      /** The Log to which logging calls will be made. */
      private static final Log log = LogFactory.getLog(MyRunnable.class);
  
      private int x;
      private String y;
      
          
      public MyRunnable() {
      }
      
      
      // Runnable interface
      //-------------------------------------------------------------------------
      public void run() {
          log.info( "About to do something where x = " + getX() + " y = " + getY() );
      }
  
  
      // Properties
      //-------------------------------------------------------------------------
      public int getX() {
          return x;
      }
      
      public void setX(int x) {
          this.x = x;
      }
      
      public String getY() {
          return y;
      }
      
      public void setY(String y) {
          this.y = y;
      }
  }
  
  
  
  1.24      +7 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java
  
  Index: XMLParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- XMLParser.java	21 Jun 2002 02:57:17 -0000	1.23
  +++ XMLParser.java	25 Jun 2002 19:12:29 -0000	1.24
  @@ -91,6 +91,7 @@
   import org.apache.commons.jelly.impl.StaticTag;
   import org.apache.commons.jelly.impl.DynaTagScript;
   import org.apache.commons.jelly.impl.ScriptBlock;
  +import org.apache.commons.jelly.impl.StaticTagScript;
   import org.apache.commons.jelly.impl.TagScript;
   import org.apache.commons.jelly.impl.TextScript;
   import org.apache.commons.jelly.expression.CompositeExpression;
  @@ -1008,7 +1009,7 @@
           throws SAXException {
           try {
               StaticTag tag = new StaticTag( namespaceURI, localName, qName);
  -            DynaTagScript script = new DynaTagScript(tag);
  +            StaticTagScript script = new StaticTagScript(tag);
   
               // now iterate through through the expressions
               int size = list.getLength();
  
  
  

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


Mime
View raw message