You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ar...@locus.apache.org on 2000/02/16 01:45:45 UTC

cvs commit: xml-xerces/java/src/org/apache/html/dom HTMLCollectionImpl.java

arkin       00/02/15 16:45:45

  Modified:    java/src/org/apache/html/dom HTMLCollectionImpl.java
  Log:
  Fixed recursion problem that lead to getRows() finding rows inside nested tables.
  
  Revision  Changes    Path
  1.4       +4 -5      xml-xerces/java/src/org/apache/html/dom/HTMLCollectionImpl.java
  
  Index: HTMLCollectionImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLCollectionImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HTMLCollectionImpl.java	2000/02/10 04:00:09	1.3
  +++ HTMLCollectionImpl.java	2000/02/16 00:45:44	1.4
  @@ -82,7 +82,7 @@
    * might be out dated, but not erroneous.
    * 
    * 
  - * @version $Revision: 1.3 $ $Date: 2000/02/10 04:00:09 $
  + * @version $Revision: 1.4 $ $Date: 2000/02/16 00:45:44 $
    * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
    * @see org.w3c.dom.html.HTMLCollection
    */
  @@ -275,7 +275,7 @@
                   {
                       if ( collectionMatch( (Element) node, null ) )
                           ++ length;
  -                    if ( recurse() )
  +                    else if ( recurse() )
                           length += getLength( (Element) node );
                   }
                   node = node.getNextSibling(); 
  @@ -325,8 +325,7 @@
                           if ( index.isZero() )
                               return node;
                           index.decrement();
  -                    }
  -                    if ( recurse() )
  +                    } else if ( recurse() )
                       {
                           result = item( (Element) node, index );
                           if ( result != null )
  @@ -368,7 +367,7 @@
                   {
                       if ( collectionMatch( (Element) node, name ) )
                           return node;
  -                    if ( recurse() )
  +                    else if ( recurse() )
                       {
                           result = namedItem( (Element) node, name );
                           if ( result != null )