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

Validate schematron references and throw fatal error if invalid URI specified #17

Closed
jordanpadams opened this issue Jun 24, 2019 · 0 comments · Fixed by #272
Closed
Labels
enhancement New feature or request p.should-have

Comments

@jordanpadams
Copy link
Member

From a user:

I had a label with a wrong Schematron reference:

href="http://psa.esa.int/psa/bc/v1/PDS4_PSA_BC_1003.sch"schematypens="http://purl.oclc.org/dsdl/schematron"?>

here there is a space missing before schematypens. oXygen didn't care,
and resolved and used the Schematron correctly - flagging my product as
invalid. But validate silently ignored my dictionary and reported no
validation errors. In both cases I was using a catalogue file.

I would expect that validate at least complains about the invalid
xml-model statement.

@jordanpadams jordanpadams added the bug Something isn't working label Jun 24, 2019
@jordanpadams jordanpadams assigned danyu-pds and hhlee445 and unassigned danyu-pds Jul 11, 2019
@jordanpadams jordanpadams added this to the PDSEN Sprint ending 2019-10-09 milestone Jul 12, 2019
@jordanpadams jordanpadams modified the milestones: PDSEN Sprint ending 2019-10-09, PDSEN Sprint ending 2019-09-25 Aug 21, 2019
@jordanpadams jordanpadams changed the title Enhance tool to catch invalid Schematron reference information Validate schematron references and throw error if invalid URI specified Aug 21, 2019
@jordanpadams jordanpadams changed the title Validate schematron references and throw error if invalid URI specified Validate schematron references and throw fatal error if invalid URI specified Aug 21, 2019
@jordanpadams jordanpadams added enhancement New feature or request requirement New requirements and removed bug Something isn't working labels Aug 21, 2019
@jordanpadams jordanpadams removed this from the PDS.26 (ends 2019-09-25) milestone Aug 23, 2019
@jordanpadams jordanpadams removed the requirement New requirements label Jan 10, 2020
qchaupds pushed a commit that referenced this issue Dec 8, 2020
…w fatal error if invalid URI specified

1. Add logging to understanding what is happening in LabelValidationRule.java
2. Add flag to explicitly show if the label is valid or not at the end of the validateLabel() function
3. Add logic to check for space before 'schematypens' token and report such error
4. Add logic to clear old error messages from ProblemContainer before performing validation
   against XSD and schematron to prevent error messages from being reported twice.
   This was observed in old code where each error messages was added twice
5. Add logic to report if label file is not found
6. Add github17 tests to ValidationIntegrationTests.java
@jordanpadams jordanpadams added this to the PDS.06 (ends 2020-12-17) milestone Dec 8, 2020
qchaupds pushed a commit that referenced this issue Dec 9, 2020
1. Add error handling if schematypens pattern is missing.
2. Add more details to error message if schematron URL is not found or cannot be loaded.
jordanpadams added a commit that referenced this issue Dec 9, 2020
Validate schematron references and throw fatal error if invalid URI specified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p.should-have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants