santiagopg    2002/06/25 13:22:27

  Modified:    java/src/org/apache/xalan/xsltc/compiler
                        ParentLocationPath.java Step.java
  Log:
  Fix for axes122.
  
  Revision  Changes    Path
  1.19      +1 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ParentLocationPath.java
  
  Index: ParentLocationPath.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ParentLocationPath.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ParentLocationPath.java   26 Apr 2002 18:11:24 -0000      1.18
  +++ ParentLocationPath.java   25 Jun 2002 20:22:27 -0000      1.19
  @@ -221,7 +221,6 @@
            final int path = ((Step)_path).getAxis();
            final int step = ((Step)stp).getAxis();
            if ((path == Axis.DESCENDANTORSELF && step == Axis.CHILD) ||
  -             (path == Axis.DESCENDANTORSELF && step == Axis.ATTRIBUTE) ||
                (path == Axis.PRECEDING        && step == Axis.PARENT)) {
                final int incl = cpg.addMethodref(NODE_ITERATOR_BASE,
                                                  "includeSelf",
  
  
  
  1.35      +7 -9      
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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Step.java 24 Jun 2002 17:02:21 -0000      1.34
  +++ Step.java 25 Jun 2002 20:22:27 -0000      1.35
  @@ -246,10 +246,8 @@
        if ((_axis == Axis.ANCESTOR)  || (_axis == Axis.ANCESTORORSELF) ||
            (_axis == Axis.PRECEDING) || (_axis == Axis.PRECEDINGSIBLING)) {
   
  -         // Do not reverse nodes if we have a parent step that will reverse
  -         // the nodes for us.
  -         if (hasParentPattern()) return false;
  -         if (hasPredicates()) return false;
  +         // Do not reverse nodes if we had predicates
  +         if (_hadPredicates) return false;
            
            // Check if this step occured under an <xsl:apply-templates> element
            SyntaxTreeNode parent = this;
  @@ -263,11 +261,9 @@
                if (parent instanceof ForEach) return true;
                if (parent instanceof FilterParentPath) return true;
                if (parent instanceof WithParam) return true;
  +             if (parent instanceof ValueOf) return true;
   
  -             // No not order node set if descendant of these elements:
  -             if (parent instanceof ValueOf) return false;
  -
  -         } while (parent != null);
  +         } while (parent != null && parent instanceof Instruction == false);
        }
        return false;
       }
  @@ -506,6 +502,8 @@
                              MethodGenerator methodGen) {
        // First test if nodes are in reverse document order
        if (!reverseNodeSet()) return;
  +
  +// System.out.println("### Order iterator");
   
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
  
  
  

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

Reply via email to