public Attribute constructAttr(String[] raw, int rawIndex, boolean isDef) { return new AttributeEventImpl(mLocation, raw[rawIndex], raw[rawIndex+1], raw[rawIndex+2], raw[rawIndex+3], isDef); } }
public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (!(o instanceof Attribute)) return false; Attribute other = (Attribute) o; if (mName.equals(other.getName()) && mValue.equals(other.getValue())) { /* But now; do we care about compatibility of * DTD/Schema datatype and whether it's created * from attribute defaulting? Let's start by being * conservative and require those to match */ if (isSpecified() == other.isSpecified()) { return stringsWithNullsEqual(getDTDType(), other.getDTDType()); } } return false; }
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException { /* Specs don't really specify exactly what to output... but * let's do a reasonable guess: */ String prefix = mName.getPrefix(); try { if (prefix != null && prefix.length() > 0) { w.write(prefix); w.write(':'); } w.write(mName.getLocalPart()); w.write('='); w.write('"'); writeEscapedAttrValue(w, mValue); w.write('"'); } catch (IOException ie) { throwFromIOE(ie); } }
public Attribute constructAttr(String[] raw, int rawIndex, boolean isDef) { return new AttributeEventImpl(mLocation, raw[rawIndex], raw[rawIndex+1], raw[rawIndex+2], raw[rawIndex+3], isDef); } }
public Attribute constructAttr(String[] raw, int rawIndex, boolean isDef) { return new AttributeEventImpl(mLocation, raw[rawIndex], raw[rawIndex+1], raw[rawIndex+2], raw[rawIndex+3], isDef); } }
for (int i = 0; i < attrCount; ++i) { QName aname = r.getAttributeName(i); attrs.put(aname, new AttributeEventImpl(loc, aname, r.getAttributeValue(i), r.isAttributeSpecified(i)));
@Override public Attribute createAttribute(QName name, String value) { return new AttributeEventImpl(mLocation, name, value, true); }
@Override public Attribute createAttribute(String prefix, String nsURI, String localName, String value) { return new AttributeEventImpl(mLocation, localName, nsURI, prefix, value, true); }
@Override public Attribute createAttribute(String localName, String value) { return new AttributeEventImpl(mLocation, localName, null, null, value, true); }
protected Attribute constructAttr(String[] raw, int rawIndex, boolean isDef) { return new AttributeEventImpl(getLocation(), raw[rawIndex], raw[rawIndex+1], raw[rawIndex+2], raw[rawIndex+3], !isDef); } }
protected Attribute constructAttr(String[] raw, int rawIndex, boolean isDef) { return new AttributeEventImpl(getLocation(), raw[rawIndex], raw[rawIndex+1], raw[rawIndex+2], raw[rawIndex+3], !isDef); } }
for (int i = 0; i < attrCount; ++i) { QName aname = r.getAttributeName(i); attrs.add(new AttributeEventImpl(loc, aname, r.getAttributeValue(i), r.isAttributeSpecified(i)));
for (int i = 0; i < attrCount; ++i) { QName aname = r.getAttributeName(i); attrs.put(aname, new AttributeEventImpl(loc, aname, r.getAttributeValue(i), r.isAttributeSpecified(i)));
for (int i = 0; i < attrCount; ++i) { QName aname = r.getAttributeName(i); attrs.put(aname, new AttributeEventImpl(loc, aname, r.getAttributeValue(i), r.isAttributeSpecified(i)));
for (int i = 0; i < attrCount; ++i) { QName aname = r.getAttributeName(i); attrs.put(aname, new AttributeEventImpl(loc, aname, r.getAttributeValue(i), r.isAttributeSpecified(i)));
for (int i = 0; i < attrCount; ++i) { QName aname = r.getAttributeName(i); attrs.put(aname, new AttributeEventImpl(loc, aname, r.getAttributeValue(i), r.isAttributeSpecified(i)));