cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor DefaultTreeBuilder.java MapStackResolver.java
Date Sun, 21 Apr 2002 17:38:47 GMT
vgritsenko    02/04/21 10:38:47

  Modified:    src/java/org/apache/cocoon/components/treeprocessor Tag:
                        cocoon_2_0_3_branch DefaultTreeBuilder.java
                        MapStackResolver.java
  Log:
  fix bug: substitute parameter names
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.2   +3 -2      xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java
  
  Index: DefaultTreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- DefaultTreeBuilder.java	13 Apr 2002 08:46:30 -0000	1.3.2.1
  +++ DefaultTreeBuilder.java	21 Apr 2002 17:38:47 -0000	1.3.2.2
  @@ -93,7 +93,7 @@
   /**
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Id: DefaultTreeBuilder.java,v 1.3.2.1 2002/04/13 08:46:30 sylvain Exp
$
  + * @version CVS $Id: DefaultTreeBuilder.java,v 1.3.2.2 2002/04/21 17:38:47 vgritsenko Exp
$
    */
   
   public class DefaultTreeBuilder extends AbstractLoggable implements TreeBuilder,
  @@ -499,9 +499,10 @@
           for (int i = 0; i < children.length; i++) {
               Configuration child = children[i];
               if (true) { // FIXME : check namespace
  +                String name = child.getAttribute("name");
                   String value = child.getAttribute("value");
                   try {
  -                    params.put(child.getAttribute("name"), MapStackResolver.getResolver(value));
  +                    params.put(MapStackResolver.getResolver(name), MapStackResolver.getResolver(value));
                   } catch(PatternException pe) {
                       String msg = "Invalid pattern '" + value + "' at " + child.getLocation();
                       getLogger().error(msg, pe);
  
  
  
  1.1.2.1   +3 -2      xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/MapStackResolver.java
  
  Index: MapStackResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/MapStackResolver.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- MapStackResolver.java	5 Mar 2002 08:26:22 -0000	1.1
  +++ MapStackResolver.java	21 Apr 2002 17:38:47 -0000	1.1.2.1
  @@ -60,7 +60,7 @@
    * Utility class for handling {...} pattern substitutions from a List of Maps.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Id: MapStackResolver.java,v 1.1 2002/03/05 08:26:22 sylvain Exp $
  + * @version CVS $Id: MapStackResolver.java,v 1.1.2.1 2002/04/21 17:38:47 vgritsenko Exp
$
    */
   
   public abstract class MapStackResolver {
  @@ -156,8 +156,9 @@
           Iterator iter = expressions.entrySet().iterator();
           while (iter.hasNext()) {
               Map.Entry entry = (Map.Entry)iter.next();
  +            String name = ((MapStackResolver)entry.getKey()).resolve(mapStack);
               String value = ((MapStackResolver)entry.getValue()).resolve(mapStack);
  -            result.setParameter((String)entry.getKey(), value);
  +            result.setParameter(name, value);
           }
   
           return result;
  
  
  

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