if (defaultAttributes == null) return;
DTDAttlist attList = (DTDAttlist) defaultAttributes.get(elementName);
if (elementName == null || attList == null) return;
DTDAttribute[] atts = attList.getAttribute();
for (int i=0; i < atts.length; i++) {
DTDAttribute att = atts[i];
if (att.getDefaultValue() != null) {
boolean found = false;
int count = attributeCount;
for (int j=0; j < count; j++) {
if (attributeName[j].equals(att.getName())) {
found = true;
break;
}
}
if (!found) {
attributeCount++;
ensureAttributesCapacity(attributeCount);
attributePrefix[attributeCount-1] = null;
attributeUri[attributeCount-1] = NO_NAMESPACE;
attributeName[attributeCount-1] = att.getName();
attributeValue[attributeCount-1] = att.getDefaultValue();
}
}
}
}