Open rgdeen opened 1 month ago
@rgdeen we got your ticket. we will add it to the backlog.
Okay so further investigation... something is wrong with the 1M00 schematron. If I use it alone (even renamed to 1G to match the others), I get the above error. So it's not about having multiple versions... it's about having a bad schematron file.
So validate should somehow at least report which file it's trying to read when this kind of error occurs. It would be okay if it just did this with verbose=1 for debugging purposes (like, maybe even always report "reading schematron xxx" in verbose mode?). The error is referring to mars2020 somehow which has nothing to do with the msn ldd, which is what makes it so hard to find.
I'll submit a ticket on the msn ldd itself.
@rgdeen FYI, I updated your original ticket to format the validate execution to properly document how it was run
@rgdeen looks like this may be an issue with your CLI execution with local schemas/schematrons. It checks out when you load from the internet:
$ ./validate -t ~/Downloads/junk/*.xml --skip-content-validation
PDS Validate Tool Report
Configuration:
Version 3.5.2
Date 2024-07-11T16:56:48Z
Parameters:
Targets [file:/Users/jpadams/Downloads/junk/NLF_0770_0735276113_691FDR_N0390000NCAM00501_0A0295J02.xml, file:/Users/jpadams/Downloads/junk/NLF_0770_0735308162_662FDR_N0390650NCAM03770_0A0195J01.xml]
Severity Level WARNING
Recurse Directories true
File Filters Used [*.xml, *.XML]
Data Content Validation off
Product Level Validation on
Max Errors 100000
Registered Contexts File /Users/jpadams/test/validate-3.5.2/resources/registered_context_products.json
Product Level Validation Results
PASS: file:/Users/jpadams/Downloads/junk/NLF_0770_0735276113_691FDR_N0390000NCAM00501_0A0295J02.xml
WARNING [warning.label.schema] The schema version(s) [/PDS4//MSN/V1/PDS4_MSN_1G00_1300] does/do not match the schematron version(s) [/PDS4/MSN/V1/PDS4_MSN_1G00_1300].
WARNING [warning.label.context_ref_mismatch] line 64: Context reference name mismatch. Value: 'Mars2020' Expected one of: '[MARS 2020]'
WARNING [warning.label.context_ref_mismatch] line 74: Context reference name mismatch. Value: 'Mars 2020' Expected one of: '[Perseverance]'
WARNING [warning.label.context_ref_mismatch] line 83: Context reference name mismatch. Value: 'Navigation Camera Left' Expected one of: '[ENGINEERING CAMERA SUITE (ECAM)]'
1 product validation(s) completed
PASS: file:/Users/jpadams/Downloads/junk/NLF_0770_0735308162_662FDR_N0390650NCAM03770_0A0195J01.xml
WARNING [warning.label.context_ref_mismatch] line 64: Context reference name mismatch. Value: 'Mars2020' Expected one of: '[MARS 2020]'
WARNING [warning.label.context_ref_mismatch] line 74: Context reference name mismatch. Value: 'Mars 2020' Expected one of: '[Perseverance]'
WARNING [warning.label.context_ref_mismatch] line 83: Context reference name mismatch. Value: 'Navigation Camera Left' Expected one of: '[ENGINEERING CAMERA SUITE (ECAM)]'
2 product validation(s) completed
Summary:
2 product(s)
0 error(s)
7 warning(s)
Product Validation Summary:
2 product(s) passed
0 product(s) failed
0 product(s) skipped
2 product(s) total
Referential Integrity Check Summary:
0 check(s) passed
0 check(s) failed
0 check(s) skipped
0 check(s) total
Message Types:
6 warning.label.context_ref_mismatch
1 warning.label.schema
End of Report
Completed execution in 20342 ms
Checked for duplicates
No - I haven't checked
🐛 Describe the bug
Running with local xsd/sch files, somehow we ended up with two versions of PDS4_MSN: PDS4_MSN_1G00_1300 and PDS4_MSN_1M00_1303.
This is clearly an error, but the error message was unhelpful and it took a couple hours to figure out the problem.
Notice the "Error near" messages that come out before the product validation, with references to xsl templates that are not visible to the user. And the error "Namespace prefix 'mars2020' has not been declared" is actually wrong... the namespace has been declared.
🕵️ Expected behavior
This situation is clearly a bug and I'm happy with validate failing. But the error message could be a lot more helpful.
📜 To Reproduce
Including a tarball below with sample image and the set of LDDs. Extract it and then:
🖥 Environment Info
Did the same thing on both linux and Mac
📚 Version of Software Used
did the same thing on both validate 3.4.1 and 3.5.1
🩺 Test Data / Additional context
junk.tar.gz
🦄 Related requirements
🦄 #xyz
⚙️ Engineering Details
No response
🎉 Integration & Test
No response