Skip to content
Snippets Groups Projects
Commit 57acbf55 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- minor

parent 68c404ca
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,7 @@ enum validationSchemaType { ...@@ -48,6 +48,7 @@ enum validationSchemaType {
*/ */
public class SLUBXmlFormatValidationPlugin implements FormatValidationPlugin { public class SLUBXmlFormatValidationPlugin implements FormatValidationPlugin {
private static final ExLogger log = ExLogger.getExLogger(SLUBXmlFormatValidationPlugin.class); private static final ExLogger log = ExLogger.getExLogger(SLUBXmlFormatValidationPlugin.class);
private boolean valid = false; private boolean valid = false;
private boolean wellformed = false; private boolean wellformed = false;
private final DocumentBuilderFactory dbf = DocumentBuilderFactory.newDefaultInstance(); private final DocumentBuilderFactory dbf = DocumentBuilderFactory.newDefaultInstance();
...@@ -71,6 +72,7 @@ public class SLUBXmlFormatValidationPlugin implements FormatValidationPlugin { ...@@ -71,6 +72,7 @@ public class SLUBXmlFormatValidationPlugin implements FormatValidationPlugin {
dbf.setExpandEntityReferences(false); dbf.setExpandEntityReferences(false);
} }
private StreamSource getLocalSchema(validationSchema v) { private StreamSource getLocalSchema(validationSchema v) {
var schemaLocalURL = "resources/" + v.schemaType + "/" + v.schemaURL; var schemaLocalURL = "resources/" + v.schemaType + "/" + v.schemaURL;
...@@ -184,10 +186,12 @@ public class SLUBXmlFormatValidationPlugin implements FormatValidationPlugin { ...@@ -184,10 +186,12 @@ public class SLUBXmlFormatValidationPlugin implements FormatValidationPlugin {
dbValidate.setEntityResolver(validationCatalogResolver); dbValidate.setEntityResolver(validationCatalogResolver);
dbValidate.setErrorHandler(validationErrorHandler); dbValidate.setErrorHandler(validationErrorHandler);
reportDetail("align entitity resolver"); reportDetail("align entitity resolver");
docValidate = dbValidate.parse(new File(filePath)); docValidate = dbValidate.parse(new File(filePath));
assert(dbValidate.isValidating()); assert(dbValidate.isValidating());
docValidate.getXmlVersion(); var version = docValidate.getXmlVersion();
reportDetail("reparse with assigned schema"); reportDetail("reparse with assigned schema");
valid = true; valid = true;
wellformed = true; wellformed = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment