cziegeler    2003/12/11 06:28:50

  Modified:    src/java/org/apache/cocoon/xml AttributesImpl.java
  Log:
  Adding remove methods
  
  Revision  Changes    Path
  1.2       +21 -1     
cocoon-2.2/src/java/org/apache/cocoon/xml/AttributesImpl.java
  
  Index: AttributesImpl.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/xml/AttributesImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AttributesImpl.java       6 May 2003 12:09:20 -0000       1.1
  +++ AttributesImpl.java       11 Dec 2003 14:28:50 -0000      1.2
  @@ -94,4 +94,24 @@
                                        String value) {
                addAttribute(uri, localName, qName, AttributeTypes.CDATA, 
value);
        }
  +
  +    /**
  +     * Remove an attribute
  +     */
  +    public void removeAttribute(String localName) {
  +        final int index = this.getIndex(localName);
  +        if ( index != -1 ) {
  +            this.removeAttribute(index);
  +        }
  +    }
  +
  +    /**
  +     * Remove an attribute
  +     */
  +    public void removeAttribute(String uri, String localName) {
  +        final int index = this.getIndex(uri, localName);
  +        if ( index != -1 ) {
  +            this.removeAttribute(index);
  +        }
  +    }
   }
  
  
  

Reply via email to