santiagopg    2004/12/06 08:12:50

  Modified:    java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
                        Operators.java
  Log:
  Patch for Jira-2003. Problem was unrelated to recursion, but simply a bug in 
the basis library. Swapping operands requires swapping operators and the latter 
was not done. A workaround for this bug would be to swap the operands (and 
operator) in the stylesheet (as that would not cause any swapping in the basis 
library).
  
  Revision  Changes    Path
  1.79      +3 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
  
  Index: BasisLibrary.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- BasisLibrary.java 25 May 2004 18:41:38 -0000      1.78
  +++ BasisLibrary.java 6 Dec 2004 16:12:50 -0000       1.79
  @@ -739,8 +739,9 @@
   
            if (hasSimpleType(left) ||
                left instanceof DOM && right instanceof DTMAxisIterator) {
  -             // swap operands
  +             // swap operands and operator
                final Object temp = right; right = left; left = temp;
  +                op = Operators.swapArray[op];
            }
   
            if (left instanceof DOM) {
  
  
  
  1.4       +6 -1      
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/Operators.java
  
  Index: Operators.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/Operators.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Operators.java    16 Feb 2004 22:55:54 -0000      1.3
  +++ Operators.java    6 Dec 2004 16:12:50 -0000       1.4
  @@ -34,4 +34,9 @@
       public static final String[] names = {
        "=", "!=", ">", "<", ">=", "<="
       };
  +    
  +    // Swap operator array
  +    public static final int[] swapArray = {
  +        0, 1, 3, 2, 5, 4
  +    };   
   }
  
  
  

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

Reply via email to