// we need to attach a XSDSchemaLocator in order to resolve inline schema locations
// if there's not already one attached
XSDSchemaLocator xsdSchemaLocator = (XSDSchemaLocator)EcoreUtil.getRegisteredAdapter(this, XSDSchemaLocator.class);
if (xsdSchemaLocator == null)
{
getResourceSet().getAdapterFactories().add(new XSDSchemaLocatorAdapterFactory());
}
if (eObject instanceof DefinitionImpl)
{
DefinitionImpl definition = (DefinitionImpl)eObject;