StAXAttributeProcessor<?> processor = null;
//lookup for registered attribute processors
processor = (StAXAttributeProcessor<?>)processors.getProcessor(attributeName);
if (processor == null) {
Location location = source.getLocation();
// Skip xsi:type, xsi:nil and xsi:schemaLocation etc
if (!W3C_XML_SCHEMA_INSTANCE_NS_URI.equals(attributeName.getNamespaceURI())) {
if (logger.isLoggable(Level.WARNING)) {
logger.warning("Attribute " + attributeName + " cannot be processed. (" + location + ")");
}
warning(context.getMonitor(), "AttributeCannotBeProcessed", processors, attributeName, location);
}
} else {
return processor.read(attributeName, source, context);
}
//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(context.getMonitor(), "DefaultAttributeProcessorNotAvailable", processors, ANY_ATTRIBUTE, location);
}