/** * Copy an entire Attributes object. The "specified" flags are * assigned as true, and "declared" flags as false (except when * an attribute's type is not CDATA), * unless the object is an Attributes2 object. * In that case those flag values are all copied. * * @param atts The attributes to copy. * * @see AttributesImpl#setAttributes */ public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); declared = new boolean [length]; specified = new boolean [length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { declared [i] = a2.isDeclared (i); specified [i] = a2.isSpecified (i); } } else { for (int i = 0; i < length; i++) { declared [i] = !"CDATA".equals (atts.getType (i)); specified [i] = true; } } }
/** Fills in the XMLAttributes object. */ private void fillXMLAttributes2(Attributes2 att) { fAttributes.removeAllAttributes(); final int len = att.getLength(); for (int i = 0; i < len; ++i) { fillXMLAttribute(att, i); fAttributes.setSpecified(i, att.isSpecified(i)); if (att.isDeclared(i)) { fAttributes.getAugmentations(i).putItem(Constants.ATTRIBUTE_DECLARED, Boolean.TRUE); } } }
String attLocalName = atts.getLocalName(i); final String attQName = atts.getQName(i); final boolean specified = (atts instanceof Attributes2) ? ((Attributes2)atts).isSpecified(i) : true;
String xmlIdValue = null; boolean needsWrap = false; int len = atts2.getLength(); for (int i = 0; i < len; i++) { String ns = atts2.getURI(i); String local = atts2.getLocalName(i); String type = atts2.getType(i); if ("id" == local && "" == ns && "http://www.xml-cml.org/schema" != uri) { idIndex = i; checkId("id", atts2.getValue(i)); if ("ID" != type) { needsWrap = true; String value = atts2.getValue(i); String normalizedValue = avNormalize(value); if (value != normalizedValue) { if (atts2.isDeclared(i)) { super.error(new SAXParseException("The attribute \u201Cxml:id\u201D was declared to be of type " + type + "in the DTD although it is required to be declared to be of type ID.", locator)); String qn = atts2.getQName(i); super.warning(new SAXParseException("Unusual attribute \u201C" + qn + "\u201D declared be of type ID. This may be a compatibility problem when the DTD is not processed.", locator)); checkId(qn, atts2.getValue(i));
@Override public boolean isDeclared(int index){ return delegate.isDeclared(index); }
/** Fills in the XMLAttributes object. */ private void fillXMLAttributes2(Attributes2 att) { fAttributes.removeAllAttributes(); final int len = att.getLength(); for (int i = 0; i < len; ++i) { fillXMLAttribute(att, i); fAttributes.setSpecified(i, att.isSpecified(i)); if (att.isDeclared(i)) { fAttributes.getAugmentations(i).putItem(Constants.ATTRIBUTE_DECLARED, Boolean.TRUE); } } }
@Override public boolean isSpecified(int index){ return delegate.isSpecified(index); }
@Override public boolean isDeclared(String qName){ return delegate.isDeclared(qName); }
/** * Copy an entire Attributes object. The "specified" flags are * assigned as true, and "declared" flags as false (except when * an attribute's type is not CDATA), * unless the object is an Attributes2 object. * In that case those flag values are all copied. * * @param atts The attributes to copy. * * @see AttributesImpl#setAttributes */ public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); declared = new boolean [length]; specified = new boolean [length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { declared [i] = a2.isDeclared (i); specified [i] = a2.isSpecified (i); } } else { for (int i = 0; i < length; i++) { declared [i] = !"CDATA".equals (atts.getType (i)); specified [i] = true; } } }
/** Fills in the XMLAttributes object. */ private void fillXMLAttributes2(Attributes2 att) { fAttributes.removeAllAttributes(); final int len = att.getLength(); for (int i = 0; i < len; ++i) { fillXMLAttribute(att, i); fAttributes.setSpecified(i, att.isSpecified(i)); if (att.isDeclared(i)) { fAttributes.getAugmentations(i).putItem(Constants.ATTRIBUTE_DECLARED, Boolean.TRUE); } } }
@Override public boolean isSpecified(String uri, String localName){ return delegate.isSpecified(translateAttribute(uri, new2old), localName); }
@Override public boolean isDeclared(String uri, String localName){ return delegate.isDeclared(translateAttribute(uri, new2old), localName); }
/** * Copy an entire Attributes object. The "specified" flags are * assigned as true, and "declared" flags as false (except when * an attribute's type is not CDATA), * unless the object is an Attributes2 object. * In that case those flag values are all copied. * * @see AttributesImpl#setAttributes */ public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); declared = new boolean [length]; specified = new boolean [length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { declared [i] = a2.isDeclared (i); specified [i] = a2.isSpecified (i); } } else { for (int i = 0; i < length; i++) { declared [i] = !"CDATA".equals (atts.getType (i)); specified [i] = true; } } }
@Override public boolean isSpecified(String qName){ return delegate.isSpecified(translateAttribute(qName, newNSSupport, oldNSSupport)); } }
/** * Copy an entire Attributes object. The "specified" flags are * assigned as true, and "declared" flags as false (except when * an attribute's type is not CDATA), * unless the object is an Attributes2 object. * In that case those flag values are all copied. * * @param atts The attributes to copy. * * @see AttributesImpl#setAttributes */ public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); declared = new boolean [length]; specified = new boolean [length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { declared [i] = a2.isDeclared (i); specified [i] = a2.isSpecified (i); } } else { for (int i = 0; i < length; i++) { declared [i] = !"CDATA".equals (atts.getType (i)); specified [i] = true; } } }
if (attributes2.isSpecified(i)) { params.add(param);
/** * Copy an entire Attributes object. The "specified" flags are * assigned as true, and "declared" flags as false (except when * an attribute's type is not CDATA), * unless the object is an Attributes2 object. * In that case those flag values are all copied. * * @param atts The attributes to copy. * * @see AttributesImpl#setAttributes */ public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); declared = new boolean [length]; specified = new boolean [length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { declared [i] = a2.isDeclared (i); specified [i] = a2.isSpecified (i); } } else { for (int i = 0; i < length; i++) { declared [i] = !"CDATA".equals (atts.getType (i)); specified [i] = true; } } }
if (a2 != null && !a2.isSpecified(i))
/** * Copy an entire Attributes object. The "specified" flags are * assigned as true, and "declared" flags as false (except when * an attribute's type is not CDATA), * unless the object is an Attributes2 object. * In that case those flag values are all copied. * * @param atts The attributes to copy. * * @see AttributesImpl#setAttributes */ public void setAttributes (Attributes atts) { int length = atts.getLength (); super.setAttributes (atts); declared = new boolean [length]; specified = new boolean [length]; if (atts instanceof Attributes2) { Attributes2 a2 = (Attributes2) atts; for (int i = 0; i < length; i++) { declared [i] = a2.isDeclared (i); specified [i] = a2.isSpecified (i); } } else { for (int i = 0; i < length; i++) { declared [i] = !"CDATA".equals (atts.getType (i)); specified [i] = true; } } }
&& !((Attributes2) atts).isSpecified(qname)) { if (defaultedAttributesAction == -1) {