You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/01/26 06:02:03 UTC

cvs commit: xml-xalan/src/org/apache/xalan/xpath SimpleNodeLocator.java

sboag       00/01/25 21:02:03

  Modified:    src/org/apache/xalan/xpath SimpleNodeLocator.java
  Log:
  Did .equals in findDescendants, so it will work with node proxys.
  
  Revision  Changes    Path
  1.8       +5 -5      xml-xalan/src/org/apache/xalan/xpath/SimpleNodeLocator.java
  
  Index: SimpleNodeLocator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/SimpleNodeLocator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SimpleNodeLocator.java	2000/01/05 23:05:25	1.7
  +++ SimpleNodeLocator.java	2000/01/26 05:02:02	1.8
  @@ -980,13 +980,13 @@
           Node nextNode = pos.getFirstChild();
           while(null == nextNode)
           {
  -          if(context == pos)
  +          if(context.equals( pos ))
               break;
             nextNode = pos.getNextSibling();
             if(null == nextNode)
             {
               pos = pos.getParentNode();
  -            if((context == pos) || (pos == null))
  +            if((pos == null) || (context.equals( pos )))
               {
                 nextNode = null;
                 break;
  @@ -1006,7 +1006,7 @@
           context = pos;
           while(null != pos)
           {                   
  -          if((stepType == xpath.FROM_DESCENDANTS_OR_SELF) || (context != pos))
  +          if((stepType == xpath.FROM_DESCENDANTS_OR_SELF) || (!context.equals( pos )))
             {
               if(xpath.MATCH_SCORE_NONE != nodeTest(xpath, execContext, pos, opPos, argLen, stepType))
               {
  @@ -1016,13 +1016,13 @@
             Node nextNode = pos.getFirstChild();
             while(null == nextNode)
             {
  -            if(context == pos)
  +            if(context.equals( pos ))
                 break;
               nextNode = pos.getNextSibling();
               if(null == nextNode)
               {
                 pos = pos.getParentNode();
  -              if((context == pos) || (pos == null))
  +              if((context.equals( pos )) || (pos == null))
                 {
                   nextNode = null;
                   break;