You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/11/08 19:27:52 UTC

cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl JSLTagLibrary.java

jstrachan    2002/11/08 10:27:52

  Modified:    jelly/src/java/org/apache/commons/jelly TagLibrary.java
               jelly/src/java/org/apache/commons/jelly/parser
                        XMLParser.java
               jelly/src/java/org/apache/commons/jelly/impl TagScript.java
               jelly/src/java/org/apache/commons/jelly/tags/junit
                        JUnitTagLibrary.java
               jelly/src/java/org/apache/commons/jelly/tags/xml
                        XMLTagLibrary.java XPathExpression.java
               jelly/src/test/org/apache/commons/jelly/junit suite.jelly
               jelly/src/java/org/apache/commons/jelly/tags/jsl
                        JSLTagLibrary.java
  Added:       jelly/src/java/org/apache/commons/jelly
                        NamespaceAwareTag.java
  Log:
  Added support for NamespaceAwareTags. This allows Tag implementations to be given the namespace context in which they are used. 
  This allows tags to, for example, map namespace qualified names to namespace URIs using namespace prefixes.
  
  For example in XSD or SOAP or BPEL styles of languages, qualified names like "x:foo" can be used. The 'x' is a prefix. The namespace context maps prefixes 'x' to the URI.
  
  This patch also means that all the XPath expressions in the XML library, JSL and JellyUnit can also make use of the XPath prefixes that are available.
  This allows full namespace-based XPath to be used.
  
  Revision  Changes    Path
  1.17      +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/TagLibrary.java
  
  Index: TagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/TagLibrary.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TagLibrary.java	30 Oct 2002 19:16:26 -0000	1.16
  +++ TagLibrary.java	8 Nov 2002 18:27:51 -0000	1.17
  @@ -155,7 +155,7 @@
       /** Allows taglibs to use their own expression evaluation mechanism */
       public Expression createExpression(
           ExpressionFactory factory,
  -        String tagName,
  +        TagScript tagScript,
           String attributeName,
           String attributeValue)
           throws Exception {
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/NamespaceAwareTag.java
  
  Index: NamespaceAwareTag.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/DynaTag.java,v 1.6 2002/10/30 19:16:26 jstrachan Exp $
   * $Revision: 1.6 $
   * $Date: 2002/10/30 19:16:26 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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: DynaTag.java,v 1.6 2002/10/30 19:16:26 jstrachan Exp $
   */
  
  package org.apache.commons.jelly;
  
  import java.util.Map;
  
  /** 
   * <p><code>NamespaceAwareTag</code> represents a Jelly custom tag which
   * needs to be aware of the XML Namespace context in which it is used.
   * When the tag is used it will be given the namespace context which is a
   * Map keyed on the namespace prefixes and the values are the namespace URIs
   * in scope in the tags element.
   * </p>
   *
   * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
   * @version $Revision: 1.6 $
   */
  
  public interface NamespaceAwareTag extends Tag {
  
      /** 
       * Sets the namespace context in scope when this tag is used
       * 
       * @param prefixToUriMap is a Map where the keys are the namespace
       * prefixes and the values are the namespace URIs
       */
      public void setNamespaceContext(Map prefixToUriMap);
  }
  
  
  
  1.39      +31 -19    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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- XMLParser.java	30 Oct 2002 19:16:33 -0000	1.38
  +++ XMLParser.java	8 Nov 2002 18:27:51 -0000	1.39
  @@ -637,22 +637,13 @@
               
               // if this is a tag then create a script to run it
               // otherwise pass the text to the current body
  -            TagScript parentTagScript = tagScript;
  -            tagScript = createTag(namespaceURI, localName, list);
  -            if (tagScript == null) {
  -                tagScript = createStaticTag(namespaceURI, localName, qName, list);
  +            TagScript newTagScript = createTag(namespaceURI, localName, list);
  +            if (newTagScript == null) {
  +                newTagScript = createStaticTag(namespaceURI, localName, qName, list);
               }
  +            tagScript = newTagScript;
               tagScriptStack.add(tagScript);
               if (tagScript != null) {
  -                // set parent relationship...
  -                tagScript.setParent(parentTagScript);
  -
  -                // set the namespace Map
  -                if ( elementNamespaces != null ) {
  -                    tagScript.setNamespacesMap( elementNamespaces );
  -                    elementNamespaces = null;
  -                }                
  -                
                   // set the line number details
                   if ( locator != null ) {
                       tagScript.setLocator(locator);
  @@ -1054,6 +1045,8 @@
               if (taglib != null) {
                   TagScript script = taglib.createTagScript(localName, list);
                   if ( script != null ) {
  +                	configureTagScript(script);
  +                	
                       // clone the attributes to keep them around after this parse
                       script.setSaxAttributes(new AttributesImpl(list));
                       
  @@ -1065,7 +1058,7 @@
                           Expression expression =
                               taglib.createExpression(
                                   getExpressionFactory(),
  -                                localName,
  +                                script,
                                   attributeName,
                                   attributeValue);
                           if (expression == null) {
  @@ -1085,6 +1078,7 @@
               throw createSAXException(e);
           }
       }
  +                
       
       /**
        * Factory method to create a static Tag that represents some static content.
  @@ -1104,6 +1098,7 @@
                       }
                   }
               );
  +            configureTagScript(script);
   
               // now iterate through through the expressions
               int size = list.getLength();
  @@ -1127,6 +1122,23 @@
               throw createSAXException(e);
           }
       }
  +
  +
  +	/**
  +	 * Configure a newly created TagScript instance before any Expressions are created
  +	 *
  +	 * @param tagScript
  +	 */
  +	protected void configureTagScript(TagScript aTagScript) {		
  +	    // set parent relationship...
  +	    aTagScript.setParent(this.tagScript);
  +	
  +	    // set the namespace Map
  +	    if ( elementNamespaces != null ) {
  +	        aTagScript.setTagNamespacesMap( elementNamespaces );
  +	        elementNamespaces = null;
  +	    }
  +	}                
       
       /**
        * Adds the text to the current script block parsing any embedded
  
  
  
  1.26      +58 -16    jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TagScript.java
  
  Index: TagScript.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- TagScript.java	30 Oct 2002 19:29:15 -0000	1.25
  +++ TagScript.java	8 Nov 2002 18:27:51 -0000	1.26
  @@ -82,6 +82,7 @@
   import org.apache.commons.jelly.JellyContext;
   import org.apache.commons.jelly.JellyException;
   import org.apache.commons.jelly.DynaTag;
  +import org.apache.commons.jelly.NamespaceAwareTag;
   import org.apache.commons.jelly.Script;
   import org.apache.commons.jelly.Tag;
   import org.apache.commons.jelly.XMLOutput;
  @@ -121,8 +122,15 @@
       /** The attribute expressions that are created */
       protected Map attributes = new Hashtable();
       
  -    /** the optional namespaces Map of prefix -> URI */
  -    private Map namespacesMap;
  +    /** the optional namespaces Map of prefix -> URI of this single Tag */
  +    private Map tagNamespacesMap;
  +    
  +    /** 
  +     * The optional namespace context mapping all prefixes -> URIs in scope
  +     * at the point this tag is used.
  +     * This Map is only created lazily if it is required by the NamespaceAwareTag.
  +     */
  +    private Map namespaceContext;
       
       /** the Jelly file which caused the problem */
       private String fileName;
  @@ -182,14 +190,15 @@
       }
       
       /**
  -     * Sets the optional namespaces prefix -> URI map
  +     * Sets the optional namespaces prefix -> URI map of 
  +     * the namespaces attached to this Tag
        */
  -    public void setNamespacesMap(Map namespacesMap) {
  +    public void setTagNamespacesMap(Map tagNamespacesMap) {
           // lets check that this is a thread-safe map
  -        if ( ! (namespacesMap instanceof Hashtable) ) {
  -            namespacesMap = new Hashtable( namespacesMap );
  +        if ( ! (tagNamespacesMap instanceof Hashtable) ) {
  +            tagNamespacesMap = new Hashtable( tagNamespacesMap );
           }
  -        this.namespacesMap = namespacesMap;
  +        this.tagNamespacesMap = tagNamespacesMap;
       }
           
       /**
  @@ -437,6 +446,34 @@
           this.localName = localName;
       }
   
  +
  +	/**
  +	 * Returns the namespace context of this tag. This is all the prefixes
  +	 * in scope in the document where this tag is used which are mapped to
  +	 * their namespace URIs.
  +	 * 
	 * @return a Map with the keys are namespace prefixes and the values are
  +	 * namespace URIs.
	 */
  +	public synchronized Map getNamespaceContext() {
  +		if (namespaceContext == null) {
  +			if (parent != null) {
  +				namespaceContext = getParent().getNamespaceContext();
  +				if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) {
  +					// create a new child context
  +					Hashtable newContext = new Hashtable(namespaceContext.size()+1);
  +					newContext.putAll(namespaceContext);
  +					newContext.putAll(tagNamespacesMap);
  +					namespaceContext = newContext;
  +				}
  +			}
  +			else {
  +				namespaceContext = tagNamespacesMap;
  +				if (namespaceContext == null) {
  +					namespaceContext = new Hashtable();
  +				}
  +			}
  +		}
  +		return namespaceContext;
  +	}
       
       // Implementation methods
       //-------------------------------------------------------------------------      
  @@ -466,6 +503,11 @@
           }
           tag.setParent( parentTag );
           tag.setBody( tagBody );
  +        
  +        if (tag instanceof NamespaceAwareTag) {
  +        	NamespaceAwareTag naTag = (NamespaceAwareTag) tag;
  +        	naTag.setNamespaceContext(getNamespaceContext());
  +        }
       }
        
       /**
  @@ -487,8 +529,8 @@
        * Output the new namespace prefixes used for this element
        */    
       protected void startNamespacePrefixes(XMLOutput output) throws SAXException {
  -        if ( namespacesMap != null ) {
  -            for ( Iterator iter = namespacesMap.entrySet().iterator(); iter.hasNext(); ) {
  +        if ( tagNamespacesMap != null ) {
  +            for ( Iterator iter = tagNamespacesMap.entrySet().iterator(); iter.hasNext(); ) {
                   Map.Entry entry = (Map.Entry) iter.next();
                   String prefix = (String) entry.getKey();
                   String uri = (String) entry.getValue();
  @@ -501,8 +543,8 @@
        * End the new namespace prefixes mapped for the current element
        */    
       protected void endNamespacePrefixes(XMLOutput output) throws SAXException {
  -        if ( namespacesMap != null ) {
  -            for ( Iterator iter = namespacesMap.keySet().iterator(); iter.hasNext(); ) {
  +        if ( tagNamespacesMap != null ) {
  +            for ( Iterator iter = tagNamespacesMap.keySet().iterator(); iter.hasNext(); ) {
                   String prefix = (String) iter.next();
                   output.endPrefixMapping(prefix);
               }
  
  
  
  1.5       +4 -3      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/junit/JUnitTagLibrary.java
  
  Index: JUnitTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/junit/JUnitTagLibrary.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JUnitTagLibrary.java	30 Oct 2002 19:16:30 -0000	1.4
  +++ JUnitTagLibrary.java	8 Nov 2002 18:27:51 -0000	1.5
  @@ -67,6 +67,7 @@
   import org.apache.commons.jelly.TagLibrary;
   import org.apache.commons.jelly.expression.Expression;
   import org.apache.commons.jelly.expression.ExpressionFactory;
  +import org.apache.commons.jelly.impl.TagScript;
   import org.apache.commons.jelly.tags.xml.XPathExpression;
   
   import org.apache.commons.logging.Log;
  @@ -97,7 +98,7 @@
   
       public Expression createExpression(
           ExpressionFactory factory,
  -        String tagName,
  +        TagScript tagScript,
           String attributeName,
           String attributeValue) throws Exception {
   
  @@ -110,7 +111,7 @@
               
               try {
                   XPath xpath = new Dom4jXPath(attributeValue);
  -                return new XPathExpression(xpath);
  +                return new XPathExpression(xpath, tagScript);
               }
               catch (JaxenException e) {
                   throw new JellyException( "Could not parse XPath expression: \"" + attributeValue + "\" reason: " + e, e );            
  @@ -118,6 +119,6 @@
           }
           
           // will use the default expression instead
  -        return super.createExpression(factory, tagName, attributeName, attributeValue);
  +        return super.createExpression(factory, tagScript, attributeName, attributeValue);
       }
   }
  
  
  
  1.15      +9 -8      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/XMLTagLibrary.java
  
  Index: XMLTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/XMLTagLibrary.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XMLTagLibrary.java	30 Oct 2002 19:16:23 -0000	1.14
  +++ XMLTagLibrary.java	8 Nov 2002 18:27:51 -0000	1.15
  @@ -65,6 +65,7 @@
   import org.apache.commons.jelly.TagLibrary;
   import org.apache.commons.jelly.expression.Expression;
   import org.apache.commons.jelly.expression.ExpressionFactory;
  +import org.apache.commons.jelly.impl.TagScript;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -103,7 +104,7 @@
   
       public Expression createExpression(
           ExpressionFactory factory,
  -        String tagName,
  +        TagScript tagScript,
           String attributeName,
           String attributeValue) throws Exception {
   
  @@ -116,7 +117,7 @@
   
               try {
                   XPath xpath = new Dom4jXPath(attributeValue);
  -                return new XPathExpression(xpath);
  +                return new XPathExpression(xpath, tagScript);
               }
               catch (JaxenException e) {
                   throw new JellyException( "Could not parse XPath expression: \"" + attributeValue + "\" reason: " + e, e );
  @@ -124,6 +125,6 @@
           }
   
           // will use the default expression instead
  -        return super.createExpression(factory, tagName, attributeName, attributeValue);
  +        return super.createExpression(factory, tagScript, attributeName, attributeValue);
       }
   }
  
  
  
  1.8       +24 -6     jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/XPathExpression.java
  
  Index: XPathExpression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/XPathExpression.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XPathExpression.java	30 Oct 2002 19:16:23 -0000	1.7
  +++ XPathExpression.java	8 Nov 2002 18:27:51 -0000	1.8
  @@ -63,13 +63,20 @@
   
   import java.io.IOException;
   import java.io.Writer;
  +import java.util.Map;
   
   import org.apache.commons.jelly.JellyContext;
   import org.apache.commons.jelly.Script;
   import org.apache.commons.jelly.Tag;
   import org.apache.commons.jelly.expression.ExpressionSupport;
  +import org.apache.commons.jelly.impl.TagScript;
  +
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   
   import org.jaxen.XPath;
  +import org.jaxen.NamespaceContext;
  +import org.jaxen.SimpleNamespaceContext;
   import org.jaxen.VariableContext;
   
   /** An expression which returns an XPath object.
  @@ -79,14 +86,25 @@
     */
   public class XPathExpression extends ExpressionSupport implements VariableContext {
       
  +    /** The Log to which logging calls will be made. */
  +    private Log log = LogFactory.getLog(XPathExpression.class);
  +
       private XPath xpath;
       private JellyContext context;
       
       public XPathExpression() {
       }
   
  -    public XPathExpression(XPath xpath) {
  +    public XPathExpression(XPath xpath, TagScript tagScript) {
           this.xpath = xpath;
  +        
  +        Map uris = tagScript.getNamespaceContext();
  +        
  +        if (log.isDebugEnabled()) {
  +        	log.debug( "Setting the namespace context to be: " + uris );
  +        }
  +        
  +        xpath.setNamespaceContext( new SimpleNamespaceContext( uris ) );
       }
       
       public String toString() {
  
  
  
  1.4       +27 -6     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/junit/suite.jelly
  
  Index: suite.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/junit/suite.jelly,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- suite.jelly	22 Oct 2002 07:24:56 -0000	1.3
  +++ suite.jelly	8 Nov 2002 18:27:52 -0000	1.4
  @@ -28,12 +28,33 @@
       <test:assert xpath="$doc/foo/bar = 'cheese'">This should never fail</test:assert>
       
       <j:catch var="ex">
  -	  <test:assert xpath="$doc/foo/xyz">This should always fail</test:assert>
  -	</j:catch>    	
  -	
  -	<test:assert test="${ex != null}">We should have created an exception</test:assert>
  -	
  -	The exception was: ${ex.message}
  +		  <test:assert xpath="$doc/foo/xyz">This should always fail</test:assert>
  +		</j:catch>    	
  +		
  +		<test:assert test="${ex != null}">We should have created an exception</test:assert>
  +		
  +		The exception was: ${ex.message}
  +  </test:case>
  +
  +	<!-- test the use of namespaces with XPath -->
  +  <test:case name="assertXPathWithNamespaceTests" xmlns:a="fooURI" xmlns:z="doesNotMatch">
  +  
  +    <x:parse var="doc">
  +      <foo xmlns="fooURI">
  +      	<bar>cheese</bar>
  +      </foo>
  +    </x:parse>  
  +     
  +    <test:assert xpath="$doc/a:foo/a:bar">This should never fail</test:assert>
  +    <test:assert xpath="$doc/b:foo/b:bar" xmlns:b="fooURI">This should never fail</test:assert>
  +    
  +    <j:catch var="ex">
  +		  <test:assert xpath="$doc/z:foo/z:bar">This should always fail</test:assert>
  +		</j:catch>    	
  +		
  +		<test:assert test="${ex != null}">We should have created an exception</test:assert>
  +		
  +		The exception was: ${ex.message}
     </test:case>
   
   
  
  
  
  1.5       +4 -3      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/JSLTagLibrary.java
  
  Index: JSLTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/jsl/JSLTagLibrary.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JSLTagLibrary.java	30 Oct 2002 19:16:34 -0000	1.4
  +++ JSLTagLibrary.java	8 Nov 2002 18:27:52 -0000	1.5
  @@ -71,6 +71,7 @@
   import org.apache.commons.jelly.Script;
   import org.apache.commons.jelly.expression.Expression;
   import org.apache.commons.jelly.expression.ExpressionFactory;
  +import org.apache.commons.jelly.impl.TagScript;
   import org.apache.commons.jelly.tags.xml.ExprTag;
   import org.apache.commons.jelly.tags.xml.XMLTagLibrary;
   import org.apache.commons.jelly.tags.xml.XPathExpression;
  @@ -105,7 +106,7 @@
   
       public Expression createExpression(
           ExpressionFactory factory,
  -        String tagName,
  +        TagScript tagScript,
           String attributeName,
           String attributeValue) throws Exception {
   
  @@ -118,7 +119,7 @@
               
               try {
                   XPath xpath = new Dom4jXPath(attributeValue);
  -                return new XPathExpression(xpath);
  +                return new XPathExpression(xpath, tagScript);
               }
               catch (JaxenException e) {
                   throw new JellyException( "Could not parse XPath expression: \"" + attributeValue + "\" reason: " + e, e );            
  @@ -140,7 +141,7 @@
           }
           
           // will use the default expression instead
  -        return super.createExpression(factory, tagName, attributeName, attributeValue);
  +        return super.createExpression(factory, tagScript, attributeName, attributeValue);
       }
       
       
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>