garyp       01/05/31 09:03:19

  Modified:    java/src/org/xml/sax/helpers AttributesImpl.java
  Log:
  Fixed removeAttribute bug pointed out by by dims.  This should be fixed in 
the next release of SAX.
  Made the same change to both Xalan and xml-commons.
  
  Revision  Changes    Path
  1.2       +7 -3      
xml-xalan/java/src/org/xml/sax/helpers/AttributesImpl.java
  
  Index: AttributesImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/xml/sax/helpers/AttributesImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AttributesImpl.java       2000/10/02 02:43:20     1.1
  +++ AttributesImpl.java       2001/05/31 16:03:17     1.2
  @@ -2,7 +2,7 @@
   // Written by David Megginson, [EMAIL PROTECTED]
   // NO WARRANTY!  This class is in the public domain.
   
  -// $Id: AttributesImpl.java,v 1.1 2000/10/02 02:43:20 sboag Exp $
  +// $Id: AttributesImpl.java,v 1.2 2001/05/31 16:03:17 garyp Exp $
   
   
   package org.xml.sax.helpers;
  @@ -430,10 +430,14 @@
       public void removeAttribute (int index)
       {
        if (index >= 0 && index < length) {
  -         data[index] = null;
  +         data[index*5] = null;
  +         data[index*5+1] = null;
  +         data[index*5+2] = null;
  +         data[index*5+3] = null;
  +         data[index*5+4] = null;
            if (index < length - 1) {
                System.arraycopy(data, (index+1)*5, data, index*5,
  -                              (length-index)*5);
  +                              (length-index-1)*5);
            }
            length--;
        } else {
  
  
  

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

Reply via email to