// iterate through all attributes
AttributeDescriptor[] attributeDescriptors
= typeDescriptor.getAttributeDescriptors();
if ( attributeDescriptors != null ) {
for ( int i = 0, size = attributeDescriptors.length; i < size; i++ ) {
AttributeDescriptor attributeDescriptor = attributeDescriptors[i];
// The following isn't really the right way to find the attribute
// but it's quite robust.
// The idea is that you try both namespace and local name first
// and if this returns null try the qName.
String value = attributes.getValue(
attributeDescriptor.getURI(),
attributeDescriptor.getLocalName()
);
if (value == null) {
value = attributes.getValue(attributeDescriptor.getQualifiedName());
}
if (log.isTraceEnabled()) {
log.trace("Attr URL:" + attributeDescriptor.getURI());
log.trace("Attr LocalName:" + attributeDescriptor.getLocalName() );
log.trace(value);
}
Updater updater = attributeDescriptor.getUpdater();
log.trace(updater);
if ( updater != null && value != null ) {
updater.update( context, value );
}
}