lmartin     2003/01/23 15:23:25

  Modified:    java/src/org/apache/xerces/dom NamedNodeMapImpl.java
  Log:
  added a method needed by compareDocPosition
  
  Revision  Changes    Path
  1.35      +17 -1     xml-xerces/java/src/org/apache/xerces/dom/NamedNodeMapImpl.java
  
  Index: NamedNodeMapImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NamedNodeMapImpl.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- NamedNodeMapImpl.java     30 Dec 2002 21:31:02 -0000      1.34
  +++ NamedNodeMapImpl.java     23 Jan 2003 23:23:25 -0000      1.35
  @@ -535,6 +535,22 @@
           return -1;
       }
   
  +    // compare 2 nodes in the map.  If a precedes b, return true, otherwise 
  +    // return false
  +    protected boolean precedes(Node a, Node b) {
  +
  +       if (nodes != null) {
  +          for (int i = 0; i < nodes.size(); i++) {
  +              Node n = (Node)nodes.elementAt(i);
  +              if (n==a) return true;
  +              if (n==b) return false;
  +          }
  +       }
  +
  +       return false;
  +    }
  +
  +
       /**
         * NON-DOM: Remove attribute at specified index
         */
  
  
  

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

Reply via email to