summaryrefslogtreecommitdiffhomepage
path: root/dlang
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-29 14:09:17 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-09-29 14:09:17 -0400
commit8b3b995b6aff5c15ba31692fd29113db3c42517f (patch)
tree4b0f7bdde11c5227b6f78229284155c979419fe6 /dlang
parenta blank first text line was being lost (diff)
format 2.1: .ocn_range is one of the properties
Format 2.1 adds .ocn_range, the first and last ocn a container holds, emitted after .last_descendant: a poem, which now carries ocn 0 and comes before its verses, is cited as the range of them. Both readers now know it as the forty-third property, so --validate accepts a 2.1 file and --report-unknown does not list it. The validator's message counts the list rather than naming a number. Every document-language of the markup document samples written by spine at 2.1 validates; neither reader uses the property, which within a major version is conforming. (assisted by Claude-Code)
Diffstat (limited to 'dlang')
-rw-r--r--dlang/src/validate.d5
1 files changed, 3 insertions, 2 deletions
diff --git a/dlang/src/validate.d b/dlang/src/validate.d
index bf8668b..b41edd8 100644
--- a/dlang/src/validate.d
+++ b/dlang/src/validate.d
@@ -25,7 +25,8 @@ struct SspFinding {
/+ ↓ specification section 6.3: the properties, in the order they are
emitted. A reader may rely on the order, so a validator can check it +/
private immutable string[] property_order = [
- "identifier", "part", "section", "parent", "last_descendant", "children",
+ "identifier", "part", "section", "parent", "last_descendant", "ocn_range",
+ "children",
"ancestors", "ancestors_collapsed", "dom_status", "dom_status_collapsed",
"heading_lev_collapsed", "parent_lev", "dummy", "ocn_off", "is_of_type",
"attrib", "meta_lang", "meta_syntax", "sha256", "image", "indent",
@@ -215,7 +216,7 @@ SspFinding[] validateSspFile(string filename, string major_known) {
string name = line[1 .. colon];
int rank = propertyRank(name);
if (rank < 0) {
- found ~= SspFinding(no, "6.3", "." ~ name ~ " is not one of the 42 properties");
+ found ~= SspFinding(no, "6.3", "." ~ name ~ " is not one of the " ~ property_order.length.to!string ~ " properties");
} else {
/+ ↓ the four repeatable properties may recur at the same rank +/
if (rank < prev_rank) {