Closed DavidLeoni closed 7 years ago
Improved a lot XML validation, which now checks that:
If any ERROR is reported, import fails. If any WARNING is reported, import fails, because by default during import there is strict validation.
To allow out-of-order import and circular references among lexical resources, there is now a force
flag that allows to ignore WARNINGs by setting non-strict validation.
This system also has now a separate function that allows to validate an XML without attempting to import it. For now such validation just performs steps 1 and 2, without matching it against the db.
Remains to implement a 'dry run' functionality, that includes step 3 without proceeding to the actual import (see #40).
When importing, by default we should issue errors for missing dependencies, like non existing namespaces and external ids pointing to nowhere. A 'force` flag will turn errors into warnings and allow the import.