nexusformat / definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
26 stars 55 forks source link

XML errors: make file and line more clear #1289

Closed woutdenolf closed 1 year ago

woutdenolf commented 1 year ago

Closes #1266

After this PR, the following error messages are produced

XML validation error

# .../definitions/base_classes/NXaperture.nxdl.xml

<group type="NXtransformations" forbidden="forbidden">
...
</group>
E           dev_tools.globals.errors.XMLSyntaxError: 
E             .../definitions/base_classes/NXaperture.nxdl.xml
E             Element '{http://definition.nexusformat.org/nxdl/3.1}group', attribute 'forbidden': 
E             The attribute 'forbidden' is not allowed., line 51

XML syntax error

# .../definitions/base_classes/NXaperture.nxdl.xml

<group type="NXtransformations"
...
</group>
E           dev_tools.globals.errors.XMLSyntaxError: 
E             .../definitions/base_classes/NXaperture.nxdl.xml
E             error parsing attribute name, line 52, column 7 (NXaperture.nxdl.xml, line 52)