diff --git a/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts b/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts index 1eee4e1ea..286ab6003 100644 --- a/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts +++ b/misc/config_tools/configurator/packages/configurator/src/lib/acrn.ts @@ -129,7 +129,8 @@ class Configurator { return this.readFile(path).then((fileContent) => { let syntactical_errors = this.pythonObject.validateScenarioStructure(fileContent); if (syntactical_errors !== "") { - throw Error("The file has broken structure.\n" + syntactical_errors); + throw Error("The loaded file does not look like a valid ACRN scenario XML.\n\n" + + "If that file is used with ACRN 2.x, try upgrading it following the instructions at https://projectacrn.github.io/latest/tutorials/upgrading_configuration.html.\n"); } return this.pythonObject.loadScenario(fileContent) }) diff --git a/misc/config_tools/configurator/pyodide/validateScenarioStructure.py b/misc/config_tools/configurator/pyodide/validateScenarioStructure.py index b32c8ed32..abab7fad5 100644 --- a/misc/config_tools/configurator/pyodide/validateScenarioStructure.py +++ b/misc/config_tools/configurator/pyodide/validateScenarioStructure.py @@ -11,7 +11,7 @@ from scenario_config.xml_loader import XMLLoadStage from .pyodide import ( convert_result, write_temp_file, - nuc11_scenario, scenario_xml_schema_path, datachecks_xml_schema_path + nuc11_scenario, schema_dir ) @@ -34,7 +34,7 @@ def main(scenario): obj = PipelineObject( scenario_path=scenario_file_path, - schema_path=scenario_xml_schema_path, + schema_path=schema_dir / 'scenario_structure.xsd', datachecks_path=None ) pipeline.run(obj) diff --git a/misc/config_tools/schema/scenario_structure.xsd b/misc/config_tools/schema/scenario_structure.xsd new file mode 100644 index 000000000..3227eb921 --- /dev/null +++ b/misc/config_tools/schema/scenario_structure.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file