You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2003/12/11 15:29:10 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/xml AttributesImpl.java
cziegeler 2003/12/11 06:29:10
Modified: src/java/org/apache/cocoon/xml AttributesImpl.java
Log:
Adding remove methods
Revision Changes Path
1.2 +23 -2 cocoon-2.1/src/java/org/apache/cocoon/xml/AttributesImpl.java
Index: AttributesImpl.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/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:29:10 -0000 1.2
@@ -94,4 +94,25 @@
String value) {
addAttribute(uri, localName, qName, AttributeTypes.CDATA, value);
}
-}
\ No newline at end of file
+
+ /**
+ * 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);
+ }
+ }
+}
+
\ No newline at end of file