morten      01/11/26 04:50:12

  Modified:    java/src/org/apache/xalan/xsltc/compiler Predicate.java
  Log:
  A fix for position predicates used within parameters and variables.
  PR:           bugzilla 4783
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.17      +4 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Predicate.java
  
  Index: Predicate.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Predicate.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Predicate.java    2001/11/06 13:42:04     1.16
  +++ Predicate.java    2001/11/26 12:50:12     1.17
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Predicate.java,v 1.16 2001/11/06 13:42:04 morten Exp $
  + * @(#)$Id: Predicate.java,v 1.17 2001/11/26 12:50:12 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -198,10 +198,12 @@
                if (_exp.typeCheck(stable) != Type.Boolean) {
                    _exp = new CastExpr(_exp, Type.Boolean);
                }
  -             if (parent instanceof Pattern)
  +             if ((parent instanceof Pattern) ||
  +                 (parent instanceof VariableBase))
                    _nthPositionFilter = true;
                else
                    _nthPositionFilter = false;
  +             _nthPositionFilter = true;
                return _type = Type.Boolean;
            }
            // Use NthPositionIterator to handle [position()] or [a]
  
  
  

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

Reply via email to