-
Notifications
You must be signed in to change notification settings - Fork 7
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
GEOM LDD schematron rules are not executing as expected <kernel_type>
validation
#797
Comments
When I try validating labels using
|
@mace-space We are investigating this right now, but Steve is on vacation. At least initially, I believe this is a major bug with LDDTool, and the schematron is actually incorrect. I believe the schematron should actually be:
Will let you know when we make a determination there. |
<kernel_type>
s<kernel_type>
validation
<kernel_type>
validation<kernel_type>
validation
@jshughes actually, looking at the example schematron and schema you produced on #799 (https://github.com/user-attachments/files/16385007/KernelType.zip), this is still not correct. We will take this discussion offline. |
@jshughes: Is this expected:
but if I specify -V1N00 or don't specify -V at all, the .sch has two such rules:
That's bad, right? |
This is correct for IM Version 1N00 and onward. The two rules have slightly different contexts, geom:SPICE_Kernel_Identification/pds:kernel_type vs geom:SPICE_Kernel_Identification/geom:kernel_type. The use of pds:kernel_type is new and more correct, however geom:kernel_type needs to remain since the Geometry LDD did not properly "expose" kernel_type. Whether and how the Geometry LDD is fixed is now a DDWG issue to be resolved. |
ah ok thanks |
Issues with this tests when running after other. Tracked here: #822 Tests still fail but this is now expected
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
Validate is passing labels that contain an incorrect kernel_type. E.g. this label:
However, the Geometry dictionary uses
pds:kernel_type
notgeom:kernel_type
– there is no definition ofkernel_type
within the Geom dictionary, and theSPICE_Kernel_Identification
class includespds.kernel_type
as a member. The change log says that this change fromkernel_type
topds:kernel_type
was made back in 2015.The schematron states:
Isn't Validate incorrect to allow the call to
geom:kernel_type
? It’s not a valid member of the class so it should trigger a structural error (not a schematron error).Alternatively, if it was reasonable for Validate to interpret
geom:kernel_type
as if it werepds:kernel_type
, then it should have rejected "BPC" as a value because it is not part of the enumerated list.🕵️ Expected behavior
I expected Validate to flag an error for
<geom:kernel_type>BPC</geom:kernel_type>
📜 To Reproduce
–
validate-3.5.0-SNAPSHOT/bin/validate <path/to/bundle> -R pds4.bundle -v 2 -r validate_report.log
🖥 Environment Info
📚 Version of Software Used
Release Date: 2024-03-06 21:32:16
🩺 Test Data / Additional context
Example label linked above (see bundleset)
🦄 Related requirements
No response
⚙️ Engineering Details
It looks like the GEOM schema expects geom:SPICE_Kernel_Identification/geom:kernel_type (as expected), but the schematron generation does not correctly translate the pds:kernel_type type into the geom: namespace.
Changing the schematron xpath from
pds:kernel_type
togeom:kernel_type
, like it should be, modifying the XML example above in to a local version of the schematron, and it now throws an error for a bad value like it should be doing.It looks like this may be specific to when an attribute is re-used from the core namespace:
The issue identified is
pds.kernel_type
is not exposed by the core namespace. LDDTool should be raising an error, but instead, mistakenly puts the disconnected references in the schema/schematron, causing the bug noted above.🎉 Integration & Test
No response
The text was updated successfully, but these errors were encountered: