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
See test data below for the schemas and test data. Warnings are expected from the execution because the schemaLocations and schematron prolog are missing, but it should still run without exception.
Note: The rule in the schematron that Saxon doesn't like (even though I think it is valid XPath) is:
<sch:pattern>
<sch:rulecontext="sb:SB_Metadata//.[ends-with(name(),'_JD')]">
<sch:asserttest="@unit eq 'julian day'">
<title>sb:SB_Metadata//.[ends-with(name(),'_JD')]/Rule</title>
The attribute "<sch:value-ofselect="name(.)"/>" must be specified with "unit='julian day'".</sch:assert>
</sch:rule>
</sch:pattern>
If you update that rule to use * instead of . it works just fine:
<sch:pattern>
<sch:rulecontext="sb:SB_Metadata//*[ends-with(name(),'_JD')]">
<sch:asserttest="@unit eq 'julian day'">
<title>sb:SB_Metadata//.[ends-with(name(),'_JD')]/Rule</title>
The attribute "<sch:value-ofselect="name(.)"/>" must be specified with "unit='julian day'".</sch:assert>
</sch:rule>
</sch:pattern>
The text was updated successfully, but these errors were encountered:
jordanpadams
changed the title
Validate throws exception when schemas provided via command-line
Validate uncaught exception for errors found in Schematron
Dec 20, 2023
I actually don't think the former (using .) is correct. In order to identify all elements whose name ends with "_JD" (as seems to be the intent), the latter (using *) is the way to do it—in other words, I don't think this was a problem with Saxon/validate.
On the SB side, it looks like this was already addressed in commit 96c7ce5, so the problem should be resolved in new builds of that dictionary.
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
When I did performed validate against the test data below with the test schemas/schematrons, validate raises an exception.
🕵️ Expected behavior
I expected validate to catch and throw a more reasonable error message (if possible).
📜 To Reproduce
See test data below for the schemas and test data. Warnings are expected from the execution because the schemaLocations and schematron prolog are missing, but it should still run without exception.
🖥 Environment Info
Mac osx
📚 Version of Software Used
v3.4.1
🩺 Test Data / Additional context
Archive.zip
🦄 Related requirements
⚙️ Engineering Details
Note: The rule in the schematron that Saxon doesn't like (even though I think it is valid XPath) is:
If you update that rule to use
*
instead of.
it works just fine:The text was updated successfully, but these errors were encountered: