return _linker.findIdentityConstraintRef(QNameHelper.forPretty(handle, 4));
case 'R': // _XR_ - external ref to attribute's type
// deprecated: replaced by _XY_
SchemaGlobalAttribute attr = _linker.findAttribute(QNameHelper.forPretty(handle, 4));
if (attr == null)
throw new SchemaTypeLoaderException("Cannot resolve attribute for handle " + handle, _name, _handle, SchemaTypeLoaderException.BAD_HANDLE);
return attr.getType().getRef();
case 'S': // _XS_ - external ref to element's type
// deprecated: replaced by _XY_
SchemaGlobalElement elem = _linker.findElement(QNameHelper.forPretty(handle, 4));
if (elem == null)
throw new SchemaTypeLoaderException("Cannot resolve element for handle " + handle, _name, _handle, SchemaTypeLoaderException.BAD_HANDLE);
return elem.getType().getRef();
case 'O': // _XO_ - external ref to document type
return _linker.findDocumentTypeRef(QNameHelper.forPretty(handle, 4));
case 'Y': // _XY_ - external ref to any possible type
SchemaType type = _linker.typeForSignature(handle.substring(4));
if (type == null)
throw new SchemaTypeLoaderException("Cannot resolve type for handle " + handle, _name, _handle, SchemaTypeLoaderException.BAD_HANDLE);
return type.getRef();
default:
throw new SchemaTypeLoaderException("Cannot resolve handle " + handle, _name, _handle, SchemaTypeLoaderException.BAD_HANDLE);
}
}