mmidy       00/07/31 12:18:58

  Modified:    java/src/org/apache/xalan/stree ElementImpl.java
  Log:
  Back out the previous change
  
  Revision  Changes    Path
  1.7       +7 -7      
xml-xalan/java/src/org/apache/xalan/stree/ElementImpl.java
  
  Index: ElementImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/stree/ElementImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ElementImpl.java  2000/07/31 17:47:02     1.6
  +++ ElementImpl.java  2000/07/31 19:18:58     1.7
  @@ -71,9 +71,9 @@
      */
     public Node         getFirstChild()
     {
  -    // The call to getLength gets the number of attributes in the list.
  +    // The call to getAttrCount gets the number of attributes in the list.
       // The attributes are put in the list before the actual children.
  -    return (getChildCount() == 0) ? null : getChild(getLength());
  +    return (getChildCount() == 0) ? null : getChild(getAttrCount());
     }
         
     /**
  @@ -86,7 +86,7 @@
       throws ArrayIndexOutOfBoundsException, NullPointerException
     {
       // wait?
  -    if (i < getLength()) 
  +    if (i < getAttrCount()) 
         return (AttrImpl)m_children[i];
       else
         return null;
  @@ -118,7 +118,7 @@
           
         }
       }
  -    return (null == m_children) ? 0 : m_children.length - getLength();
  +    return (null == m_children) ? 0 : m_children.length - getAttrCount();
     }
     
     
  @@ -244,7 +244,7 @@
        *
        * @return The number of attributes in the list.
        */
  -    public int getLength ()
  +    public int getAttrCount ()
       {
         return attrsEnd;
       }
  @@ -351,7 +351,7 @@
        */
       public int getIndex (String uri, String localPart)
       {
  -      for (int i = 0; i < getLength(); i++)
  +      for (int i = 0; i < getAttrCount(); i++)
         {
           AttrImpl attr = (AttrImpl)getChildAttribute(i);
           if (attr.getLocalName().equals(localPart) &&
  @@ -370,7 +370,7 @@
        */
       public int getIndex (String rawName)
       {
  -      for (int i = 0; i < getLength(); i++)
  +      for (int i = 0; i < getAttrCount(); i++)
         {
           AttrImpl attr = getChildAttribute(i);
           if (attr.getNodeName().equals(rawName))
  
  
  

Reply via email to