diff --git a/java/org/slub/rosetta/dps/repository/plugin/ValidationResourceResolver.java b/java/org/slub/rosetta/dps/repository/plugin/ValidationResourceResolver.java index 165e343af53e6fd88420550bc9e8bcba230e10e6..826c23dd5f5aff18ecee94c9c3f8a3a10a06a514 100644 --- a/java/org/slub/rosetta/dps/repository/plugin/ValidationResourceResolver.java +++ b/java/org/slub/rosetta/dps/repository/plugin/ValidationResourceResolver.java @@ -126,23 +126,28 @@ public class ValidationResourceResolver implements LSResourceResolver { b) MATHML3 uses includes of XSD to same namespaces */ URI schemaURI = validationSchemaOptional.get().schemaURI; - /* - System.out.println("### BASEURI: " + baseURIString + " -> " + checkUriStringIsLocal( baseURIString )); - System.out.println("### SchemaURI: " + schemaURI + " -> " + checkUriIsLocal( schemaURI) ); - */ + + resultHandle.debug("### BASEURI: " + baseURIString + " -> " + checkUriStringIsLocal( baseURIString )); + resultHandle.debug("### SchemaURI: " + schemaURI + " -> " + checkUriIsLocal( schemaURI) ); + if (checkUriStringIsLocal(baseURIString)) { if (checkUriIsLocal(schemaURI)) { assert systemId != null; assert baseURIString != null; Path combinedSchema = createCombinedSchemaFile(systemId, baseURIString); String combinedSchemaStr = combinedSchema.toString(); - /* - System.out.println("### COMBINED: "+ combinedSchemaStr); - */ + String combinedSchemaURIStr = "file://localhost".concat(combinedSchemaStr); + + resultHandle.debug("### COMBINED: "+ combinedSchemaURIStr); + File combinedSchemaFile = new File( combinedSchemaStr ); if (combinedSchemaFile.isFile()) { - resultHandle.info("RESOURCE_RESOLVER: ignoring catalog, using a combined mapping to "+ combinedSchemaStr + " instead of " + schemaURI + "!"); - schemaURI = combinedSchema.toUri(); + resultHandle.info("RESOURCE_RESOLVER: ignoring catalog, using a combined mapping to "+ combinedSchemaURIStr + " instead of " + schemaURI + "!"); + try { + schemaURI = new URI(combinedSchemaURIStr); + } catch (URISyntaxException e) { + resultHandle.error( e.getMessage() ); + } } } }