You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem is beyond validate so need guidance. Using xmllint the schema and schematron fail as expected (failure is from schema not schematron):
$ xmllint --noout --schema PDS4_GEOM_1M00_1970.xsd --schema PDS4_PDS_1M00.xsd --schematron PDS4_GEOM_1M00_1970.sch --schematron PDS4_PDS_1M00.sch u5.xml
u5.xml validation generated an internal error
u5.xml:84: element Geometry: Schemas validity error : Element '{http://pds.nasa.gov/pds4/geom/v1}Geometry': No matching global element declaration available, but demanded by the strict wildcard.
u5.xml fails to validate
Modified schema and schematron to verify that we are using the ones provided by the user, and it appears as we are. For the schematron, the check is pretty simple because I can add a comment to it and see it easily in the code. The schema is trickier but followed it via the debugger up to having the schema validation check it and it appears to be the one supplied via the command line (object ids remain constant). If I got it right, it means that this is deficiency in apache.xerces code doing the work. We are at the latest version of apache.xerces which was last updated in 2022.
This is a general weakness for validate. How do you want to approach it? I am leaning toward - but cannot say with any certainty that it can be done - using xmllint in the background and if it fails and we do not then give a general warning/error that xmllint was unhappy but the java libraries we use are not sophisticated enough to detect these errors. Lets the user know there is a failure and how to find/isolate it but keeps us from going down the rabbit hole to play with the queen of hearts. Bad part, user has to install xmllint on their platform.
Checked for duplicates
No - I haven't checked
🐛 Describe the bug
This is a by-product of testing IM#797. lddtool now creates a GEOM dict that has
Notice pds:kernel_type, not geom:kernel_type. Validate passes the attached u5.xml despite:
🕵️ Expected behavior
I expected validate to WARN or ERR for input file u5.xml's geom:kernel_type
📜 To Reproduce
PDS Validate Tool Report
Configuration:
Version 3.6.0-SNAPSHOT
Date 2024-10-09T17:39:33Z
Parameters:
Targets [file:/Users/rchen/Desktop/797/u5.xml]
User Specified Schemas [file:/Users/rchen/Desktop/797/PDS4_PDS_1M00.xsd, file:/Users/rchen/Desktop/797/PDS4_GEOM_1M00_1970.xsd]
User Specified Schematrons [file:/Users/rchen/Desktop/797/PDS4_PDS_1M00.sch, file:/Users/rchen/Desktop/797/PDS4_GEOM_1M00_1970.sch]
Severity Level WARNING
Recurse Directories true
File Filters Used [*.xml, *.XML]
Data Content Validation on
Product Level Validation on
Max Errors 100000
Registered Contexts File /Users/rchen/PDS4tools/validate/resources/registered_context_products.json
Product Level Validation Results
PASS: file:/Users/rchen/Desktop/797/u5.xml
1 product validation(s) completed
Summary:
1 product(s)
0 error(s)
0 warning(s)
Product Validation Summary:
1 product(s) passed
0 product(s) failed
0 product(s) skipped
1 product(s) total
Referential Integrity Check Summary:
0 check(s) passed
0 check(s) failed
0 check(s) skipped
0 check(s) total
End of Report
Completed execution in 2151 ms
...
🖥 Environment Info
...
📚 Version of Software Used
No response
🩺 Test Data / Additional context
797.zip
🦄 Related requirements
🦄 #xyz
⚙️ Engineering Details
No response
🎉 Integration & Test
No response
The text was updated successfully, but these errors were encountered: