protected void switchSource( State sourceState, State newRootState ) throws AbortException {
String schemaLocation = sourceState.getStartTag().getAttribute("schemaLocation");
if(schemaLocation == null) {
LSResourceResolver resolver = controller.getLSResourceResolver();
if (resolver != null) {
// TODO: push LSResolver thinking down a level.
String namespaceURI = sourceState.getStartTag().getAttribute("namespace");
if (namespaceURI == null) {
reportError("XmlSchemaReader.noLocation", sourceState.getStartTag().qName);
return;
}
LSInput resolved = resolver.resolveResource(XMLConstants.W3C_XML_SCHEMA_NS_URI,
namespaceURI, null, null, sourceState.getBaseURI());
if (resolved == null) {
reportError("XmlSchemaReader.unresolvedSchema",
sourceState.getStartTag().qName,