esrc-unimelb / CNEX3

The Contextual Network Explorer: A visualisation tool for EAC-CPF files
https://connex.esrc.unimelb.edu.au
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Doesn't complain about non EAC-CPF compliant XML #11

Open PeterTonoli opened 6 years ago

PeterTonoli commented 6 years ago

The interface needs to complain to the end-user that the XML is not sane; currently, with non-compliant XML, CNEX will continue to run, but just render a blank network - with the end user/administrator scratching their head as to what the issue is.

czk2010 commented 6 years ago

do you mean you want to validate against the cpf.xsd http://eac.staatsbibliothek-berlin.de/schema/cpf.xsd (there is currently no validation) or report malformed XML (XML syntax errors are currently sent to the log).

More generally though, parse errors and missing attributes should of course be reported to the user. I'll take a look at adding this into the json structure that comes from the relevant API endpoints

PeterTonoli commented 6 years ago

Validation against the schema definition is too much work, and for very little benefit; in the context of the issues that we've been having, all we need to check is that the XML has the EAC-CPF schema referred in it.