morten      01/11/01 05:05:49

  Modified:    java/src/org/apache/xalan/xsltc/compiler Step.java
  Log:
  Removed a desperately bad piece of code that caused XSLTC to misinterpret
  some combinations of parent location paths and predicates.
  PR:           bugzilla 4249
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.25      +12 -10    
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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Step.java 2001/10/10 11:00:39     1.24
  +++ Step.java 2001/11/01 13:05:49     1.25
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Step.java,v 1.24 2001/10/10 11:00:39 morten Exp $
  + * @(#)$Id: Step.java,v 1.25 2001/11/01 13:05:49 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -468,6 +468,8 @@
            // Handle 'elem[n]' expression
            else if (predicate.isNthPositionFilter()) {
                // Special case for typed descendant / decendant-or-self axis
  +             /* Crap piece of code right here, I added it, and I am
  +                taking it away as well. Very wrong ideed. Morten
                if (((_axis == Axis.DESCENDANT) ||
                     (_axis == Axis.DESCENDANTORSELF)) &&
                    (_nodeType > DOM.ATTRIBUTE)) {
  @@ -484,15 +486,15 @@
                    il.append(new INVOKEINTERFACE(idx, 4));
                }
                else {
  -                 idx = cpg.addMethodref(NTH_ITERATOR_CLASS,
  -                                        "<init>",
  -                                        "("+NODE_ITERATOR_SIG+"I)V");
  -                 il.append(new NEW(cpg.addClass(NTH_ITERATOR_CLASS)));
  -                 il.append(DUP);
  -                 translatePredicates(classGen, methodGen); // recursive call
  -                 predicate.translate(classGen, methodGen);
  -                 il.append(new INVOKESPECIAL(idx));
  -             }
  +             */
  +             idx = cpg.addMethodref(NTH_ITERATOR_CLASS,
  +                                    "<init>",
  +                                    "("+NODE_ITERATOR_SIG+"I)V");
  +             il.append(new NEW(cpg.addClass(NTH_ITERATOR_CLASS)));
  +             il.append(DUP);
  +             translatePredicates(classGen, methodGen); // recursive call
  +             predicate.translate(classGen, methodGen);
  +             il.append(new INVOKESPECIAL(idx));
            }
            else {
                idx = cpg.addMethodref(CURRENT_NODE_LIST_ITERATOR,
  
  
  

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

Reply via email to