public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index, origMax - index); } }
if(idx>=0) actual.removeAttribute(idx);
String normAttrName = mapper.mapSafeAttribute(name, attrName); if (normAttrName == null) { newAttributes.removeAttribute(att); att--; } else {
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index, origMax - index); } }
/** * Remove an attribute from the list. Do nothing if attribute does not exist. * * @param atts attributes * @param qName QName of the attribute to remove */ public static void removeAttribute(final AttributesImpl atts, final String qName) { final int i = atts.getIndex(qName); if (i != -1) { atts.removeAttribute(i); } }
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index, origMax - index); } }
@Override public void removeAttribute(int index) { qNames.remove(super.getQName(index)); super.removeAttribute(index); }
@Override public void removeAttribute(int index) { qNames.remove(super.getQName(index)); super.removeAttribute(index); }
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index, origMax - index); } }
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index, origMax - index); } }
@Override public void removeAttribute(int index) { qNames.remove(super.getQName(index)); super.removeAttribute(index); }
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index, origMax - index); } }
static protected Attributes removeAttribute(Attributes attributes, String localName){ int index = attributes.getIndex("", localName); if(index < 0){ return attributes; } AttributesImpl result = new AttributesImpl(attributes); result.removeAttribute(index); return result; } }
public void removeAttribute (int index) { int origMax = getLength () - 1; super.removeAttribute (index); if (index != origMax) { System.arraycopy (declared, index + 1, declared, index, origMax - index); System.arraycopy (specified, index + 1, specified, index, origMax - index); } }
public void setAttribute(String name, Object value) throws JellyTagException { // ### we'll assume that all attributes are in no namespace! // ### this is severely limiting! // ### - Tag attributes should allow for namespace aware int index = attributes.getIndex("", name); if (index >= 0) { attributes.removeAttribute(index); } // treat null values as no attribute if (value != null) { attributes.addAttribute("", name, name, "CDATA", value.toString()); } }
@Override public void removeAttribute(int index) { qNames.remove(super.getQName(index)); super.removeAttribute(index); }
@Override public void removeAttribute(int index) { qNames.remove(super.getQName(index)); super.removeAttribute(index); }
public void setAttribute(String name, Object value) throws JellyTagException { // ### we'll assume that all attributes are in no namespace! // ### this is severely limiting! // ### - Tag attributes should allow for namespace aware int index = attributes.getIndex("", name); if (index >= 0) { attributes.removeAttribute(index); } // treat null values as no attribute if (value != null) { attributes.addAttribute("", name, name, "CDATA", value.toString()); } }
@Override protected void addAttributes(ChangeText txt, Attributes attributes) { AttributesImpl newAttrs = new AttributesImpl(attributes); String href = newAttrs.getValue("href"); if (href != null) { txt.addText(" " + getWithDestination().toLowerCase() + " " + href); newAttrs.removeAttribute(newAttrs.getIndex("href")); } super.addAttributes(txt, newAttrs); }
@Override public void startElement(final String uri, final String localName, final String qName, final Attributes atts) throws SAXException { final AttributesImpl attsBuf = new AttributesImpl(atts); for (final String a : new String[]{"class", "domains", "xtrf", "xtrc"}) { final int i = attsBuf.getIndex(a); if (i != -1) { attsBuf.removeAttribute(i); } } getContentHandler().startElement(uri, localName, qName, attsBuf); }