} else { newAttributes.setLocalName(att, normAttrName);
static protected Attributes renameAttribute(Attributes attributes, String oldLocalName, String localName){ int index = attributes.getIndex("", oldLocalName); if(index < 0){ return attributes; } AttributesImpl result = new AttributesImpl(attributes); result.setLocalName(index, localName); result.setQName(index, localName); // XXX return result; }
static protected Attributes renameAttribute(Attributes attributes, String oldLocalName, String localName){ int index = attributes.getIndex("", oldLocalName); if(index < 0){ return attributes; } AttributesImpl result = new AttributesImpl(attributes); result.setLocalName(index, localName); result.setQName(index, localName); // XXX return result; }
/** * set or update an attribute. * @see org.w3c.dom.Element#setAttribute(String, String) * @param name attribute name * @param value attribute value * @throws DOMException */ public void setAttribute(String name, String value) throws DOMException { AttributesImpl impl = makeAttributesEditable(); int index = impl.getIndex(name); if (index < 0) { // not found String uri = ""; String localname = name; String qname = name; String type = "CDDATA"; impl.addAttribute(uri, localname, qname, type, value); } else { // found impl.setLocalName(index, value); } }
/** * set or update an attribute. * @see org.w3c.dom.Element#setAttribute(String, String) * @param name attribute name * @param value attribute value * @throws DOMException */ public void setAttribute(String name, String value) throws DOMException { AttributesImpl impl = makeAttributesEditable(); int index = impl.getIndex(name); if (index < 0) { // not found String uri = ""; String localname = name; String qname = name; String type = "CDDATA"; impl.addAttribute(uri, localname, qname, type, value); } else { // found impl.setLocalName(index, value); } }
/** * set or update an attribute. * @see org.w3c.dom.Element#setAttribute(String, String) * @param name attribute name * @param value attribute value * @throws DOMException */ public void setAttribute(String name, String value) throws DOMException { AttributesImpl impl = makeAttributesEditable(); int index = impl.getIndex(name); if (index < 0) { // not found String uri = ""; String localname = name; String qname = name; String type = "CDDATA"; impl.addAttribute(uri, localname, qname, type, value); } else { // found impl.setLocalName(index, value); } }
} else { newAttributes.setLocalName(att, normAttrName);
String attName[] = processName(attQName, true); atts.setURI(i, attName[0]); atts.setLocalName(i, attName[1]);
} else { newAttributes.setLocalName(att, normAttrName);
String attName[] = processName(attQName, true); atts.setURI(i, attName[0]); atts.setLocalName(i, attName[1]);
String attName[] = processName(attQName, true); atts.setURI(i, attName[0]); atts.setLocalName(i, attName[1]);
String attName[] = processName(attQName, true); atts.setURI(i, attName[0]); atts.setLocalName(i, attName[1]);