if(collection == null) {
transact.abort(txn);
throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "Collection " + path + " not found");
}
for(final Observer observer : observers) {
collection.addObserver(observer);
}
if (uri != null || res.inputSource!=null) {
setupParser(collection, res);
info = collection.validateXMLResource(txn, broker, resURI, (uri != null) ? new InputSource(uri) : res.inputSource);
} else if (res.root != null) {