Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validatio button #45

Open
andrazrepar opened this issue Apr 26, 2022 · 3 comments
Open

Validatio button #45

andrazrepar opened this issue Apr 26, 2022 · 3 comments
Assignees

Comments

@andrazrepar
Copy link
Collaborator

We need to add the option to validate the XML file. Let's add a Validate button here:
image

This button does essentially the same thing as the Update button, except that the stripForValidationis always set to Trueregardless of the setting of the Strip namespacescheckbox. @gradisarjoze, I think we simply need to use https://app.elexifier.elex.is/api/transform/405/apply/5000529?strip_ns=true&strip_header=false&strip_dict_scrap=false

The transformation script will then run validation against the TEI-Lex0 schema and will output the results like this
image

We need to display these messages as error or success messages similar to how we do this now for errors. I think @LukeItUp needs to prepare the backend function to return the relevant message.

I thin

@LukeItUp
Copy link
Collaborator

Deployed to staging.

GET https://app.elexifier.elex.is/api/transform/405/apply/5000529?strip_ns=true&strip_header=false&strip_dict_scrap=false

This call now returns field "validation" with an array of validation errors objects. The field "long_message" contains formatted error logs.
The array will be empty if strip_ns=true is not included in the call.

@gradisarjoze
Copy link
Collaborator

Deployed to staging.

@andrazrepar andrazrepar assigned LukeItUp and unassigned gradisarjoze May 25, 2022
@andrazrepar
Copy link
Collaborator Author

@LukeItUp, I think we need a new method here, because we are using returnFirstEntryOnly which does not return the TEI header which automatically fails validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants