1 16 package org.apache.cocoon.xml; 17 18 import org.xml.sax.Attributes ; 19 20 26 public class AttributesImpl extends org.xml.sax.helpers.AttributesImpl { 27 28 31 public AttributesImpl() { 32 super(); 33 } 34 35 38 public AttributesImpl(Attributes attr) { 39 super(attr); 40 } 41 42 52 public void addCDATAAttribute(String localName, String value) { 53 addAttribute("", localName, localName, AttributeTypes.CDATA, value); 54 } 55 56 67 public void addCDATAAttribute(String namespace, String localName, String value) { 68 addAttribute(namespace, localName, localName, AttributeTypes.CDATA, value); 69 } 70 71 87 public void addCDATAAttribute(String uri, 88 String localName, 89 String qName, 90 String value) { 91 addAttribute(uri, localName, qName, AttributeTypes.CDATA, value); 92 } 93 94 97 public void removeAttribute(String localName) { 98 final int index = this.getIndex(localName); 99 if ( index != -1 ) { 100 this.removeAttribute(index); 101 } 102 } 103 104 107 public void removeAttribute(String uri, String localName) { 108 final int index = this.getIndex(uri, localName); 109 if ( index != -1 ) { 110 this.removeAttribute(index); 111 } 112 } 113 } 114 | Popular Tags |