public static Schema getSchema(FileRef input, AlertSink alertSink) {
SourcePosition pos = new SourcePosition(input);
try {
return Preconditions.checkNotNull(INSTANCE.parse(input));
} catch (SAXException saxException) {
alertSink.add(new SaxAlert(pos, Severity.ERROR, saxException));
return null;
} catch (IOException iox) {
alertSink.add(new IOError(pos, iox));
return null;
}