Repository navigation
Commit a818fde
A node-level sh:or result carries the node shape's sh:severity instead of always Violation
Cause. sh:or asserted on a node shape over member shapes built its result
with `"severity": "Violation"` and `RdfTerms::new(None, ...)`, so the JSON
said "Violation" and the RDF report wrote sh:resultSeverity sh:Violation
whatever sh:severity the shape declared. SHACL 3.6.2 makes the result's
severity the shape's sh:severity, and every other path already reads it.
Fix. The query that already fetched the node shape's sh:message now also
fetches its sh:severity (both OPTIONAL). The JSON field goes through
`severity_name` (#334: local name for sh: severities, full IRI otherwise)
and the declared term goes to `RdfTerms` for the RDF writer; with none
declared both stay sh:Violation.
Verification.
- tests/shacl_validation_report_test.rs:
a_node_level_or_result_carries_the_shapes_declared_severity checks
sh:Warning, a custom hash-namespace IRI and no declaration, in the JSON
and in the Turtle report. Run against origin/main's src/shacl.rs it fails
at the JSON assertion for sh:Warning (left "Violation", right "Warning");
it passes now.
- W3C suite 94d8bc2: gated 61/15/44/0 and full tuple 53/23/44/0, unchanged;
regenerated baseline byte-identical. Report match 49 of 56.
- cargo test (full, this tree): 2032 passed, 0 failed, 2 ignored. cargo
clippy --all-features --all-targets -D warnings: clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent ba3fde0 commit a818fde
3 files changed
Lines changed: 57 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
| 1122 | + | |
1123 | 1123 | | |
1124 | 1124 | | |
1125 | 1125 | | |
1126 | | - | |
1127 | | - | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1128 | 1130 | | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1132 | 1134 | | |
1133 | 1135 | | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1134 | 1144 | | |
1135 | | - | |
| 1145 | + | |
1136 | 1146 | | |
1137 | 1147 | | |
1138 | 1148 | | |
| |||
1149 | 1159 | | |
1150 | 1160 | | |
1151 | 1161 | | |
1152 | | - | |
| 1162 | + | |
1153 | 1163 | | |
1154 | 1164 | | |
1155 | 1165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
288 | 322 | | |
289 | 323 | | |
290 | 324 | | |
| |||
0 commit comments