santiagopg    2002/06/27 07:56:29

  Modified:    java/src/org/apache/xalan/xsltc/compiler Step.java
               java/src/org/apache/xalan/xsltc/dom DOMImpl.java
  Log:
  Fix for node21 and some position tests.
  
  Revision  Changes    Path
  1.37      +6 -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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Step.java 25 Jun 2002 23:20:11 -0000      1.36
  +++ Step.java 27 Jun 2002 14:56:29 -0000      1.37
  @@ -381,12 +381,13 @@
                il.append(new PUSH(cpg, _nodeType));
                il.append(new INVOKEINTERFACE(ty, 3));
   
  -             // If needed, create a reverse iterator
  -             if (!_hadPredicates) {
  -                 orderIterator(classGen, methodGen);
  -             }
                break;
            }
  +
  +         // If needed, create a reverse iterator
  +         if (!_hadPredicates) {
  +             orderIterator(classGen, methodGen);
  +         }
        }
       }
   
  @@ -503,8 +504,6 @@
                              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();
  
  
  
  1.76      +8 -5      
xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java
  
  Index: DOMImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- DOMImpl.java      13 Jun 2002 14:16:09 -0000      1.75
  +++ DOMImpl.java      27 Jun 2002 14:56:29 -0000      1.76
  @@ -1411,12 +1411,15 @@
        public NodeIterator setStartNode(int node) {
            if (_isRestartable) {
                _last = -1;
  -             if (node >= _firstAttributeNode)
  -                 _startNode = node = _parent[node];
  -             else if (_includeSelf)
  +             if (_includeSelf) {
                    _startNode = node;
  -             else
  +             }
  +             else if (node >= _firstAttributeNode) {
  +                 _startNode = node = _parent[node];
  +             }
  +             else {
                    _startNode = _parent[node];
  +             }
                _index = _startNode;
                return resetPosition();
            }
  
  
  

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

Reply via email to