santiagopg    2002/06/25 16:20:11

  Modified:    java/src/org/apache/xalan/xsltc/compiler Step.java
  Log:
  Fixed regression.
  
  Revision  Changes    Path
  1.36      +8 -7      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java
  
  Index: Step.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- Step.java 25 Jun 2002 20:22:27 -0000      1.35
  +++ Step.java 25 Jun 2002 23:20:11 -0000      1.36
  @@ -247,7 +247,7 @@
            (_axis == Axis.PRECEDING) || (_axis == Axis.PRECEDINGSIBLING)) {
   
            // Do not reverse nodes if we had predicates
  -         if (_hadPredicates) return false;
  +         // if (_hadPredicates) return false;
            
            // Check if this step occured under an <xsl:apply-templates> element
            SyntaxTreeNode parent = this;
  @@ -260,6 +260,7 @@
                if (parent instanceof ApplyTemplates) return true;
                if (parent instanceof ForEach) return true;
                if (parent instanceof FilterParentPath) return true;
  +             if (parent instanceof FilterExpr) return true;
                if (parent instanceof WithParam) return true;
                if (parent instanceof ValueOf) return true;
   
  @@ -281,6 +282,11 @@
   
        if (hasPredicates()) {
            translatePredicates(classGen, methodGen);
  +
  +         // If needed, create a reverse iterator after compiling preds
  +         if (_predicates.size() == 0) {
  +             orderIterator(classGen, methodGen);
  +         }
        }
        else {
            // If it is an attribute but not '@*' or '@attr' with a parent
  @@ -483,11 +489,6 @@
                    il.append(new CHECKCAST(cpg.addClass(className)));
                }
                il.append(new INVOKESPECIAL(idx));
  -
  -             // If needed, create a reverse iterator after compiling preds
  -             if (_predicates.size() == 0) {
  -                 orderIterator(classGen, methodGen);
  -             }
            }
        }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to