private void startObjectElement(final Attributes atts) throws SAXException {
try {
final Map<String, String> attsMap = attributeMap(atts);
/* "id", "class" */
final ClassDef objectClassDef;
final Object object;
final boolean stateSet;
if (attsMap.containsKey("id")) {
// <object id="xxx" class="xxx"
objectClassDef = classAttribute(attsMap, "class");
final int objectIdentifier = intAttribute(attsMap, "id");
object = xmlImporter.createObject(objectClassDef,
objectIdentifier);
stateSet = false;
} else if (attsMap.containsKey("ref")) {
// <object ref="xxx"
final int objectIdentifier = intAttribute(attsMap, "ref");
object = xmlImporter.getObject(objectIdentifier);
objectClassDef = xmlImporter.classForName(object.getClass()
.getName());
stateSet = true;
} else {
final String message = "expected attribute \"id\" or \"ref\""
+ location();
logger.error(message);
throw new SAXException(message);
}
currentObjectModel = new ObjectModelForImport(
objectClassDef.getReplacementDef(), object,
objectClassDef.getReplacementClass(), stateSet);
objectCreated(currentObjectModel);
} catch (ImportException exception) {
logger.error(START_ELEMENT_ERROR, exception);
throw new SAXException(exception);
} catch (ImportClassNotFoundException exception) {