StAXAttributeProcessor<?> processor = null;
//lookup for registered attribute processors
processor = (StAXAttributeProcessor<?>)processors.getProcessor(attributeName);
if (processor == null) {
Location location = source.getLocation();
if (logger.isLoggable(Level.WARNING)) {
logger.warning("Attribute " + attributeName + " cannot be processed. (" + location + ")");
}
warning("AttributeCannotBeProcessed", processors, attributeName, location);
} else {
return processor.read(attributeName, source);
}
//handle extension attributes without processors
processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE);
if (processor == null) {
Location location = source.getLocation();
if (logger.isLoggable(Level.WARNING)) {
logger.warning("Could not find Default Attribute processor !");
}
warning("DefaultAttributeProcessorNotAvailable", processors, ANY_ATTRIBUTE, location);
}