aboutsummaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
Diffstat (limited to 'schema')
-rw-r--r--schema/colitur-v1.xsd17
-rw-r--r--schema/day-v1.json58
2 files changed, 46 insertions, 29 deletions
diff --git a/schema/colitur-v1.xsd b/schema/colitur-v1.xsd
index 46af9a9..df11c3d 100644
--- a/schema/colitur-v1.xsd
+++ b/schema/colitur-v1.xsd
@@ -10,20 +10,19 @@
<xs:complexType>
<xs:sequence>
<xs:element name="season" type="xs:string"/>
+ <xs:element name="season_name" type="xs:string"/>
<xs:element name="week" type="xs:string"/>
<xs:element name="slug" type="xs:string"/>
+ <!-- The resolved display name: a single element, no
+ lang attribute. The view's own name is now one
+ resolved string, not a value per language. -->
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="weekday" type="xs:string"/>
<xs:element name="rank" type="xs:string"/>
+ <xs:element name="rank_name" type="xs:string"/>
<xs:element name="colour" type="xs:string"/>
+ <xs:element name="colour_name" type="xs:string"/>
<xs:element name="subject" type="xs:string"/>
- <xs:element name="name" minOccurs="0" maxOccurs="unbounded">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="lang" type="xs:string" use="required"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
<xs:element name="commemoration" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="citation" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
diff --git a/schema/day-v1.json b/schema/day-v1.json
index b48133a..5a7537c 100644
--- a/schema/day-v1.json
+++ b/schema/day-v1.json
@@ -3,10 +3,21 @@
"$id": "https://colitur/schema/day-v1.json",
"title": "colitur liturgical year, v1",
"type": "object",
- "required": ["rite", "year", "months", "days"],
+ "required": ["rite", "year", "term", "weekday_headings", "months", "days"],
"properties": {
"rite": { "type": "string" },
"year": { "type": "string", "pattern": "^[0-9]{4}$" },
+ "term": { "type": "object", "additionalProperties": { "type": "string" }, "description": "fixed vocabulary (ordo, contents, epistle, lesson, gospel, commemoration, week) in the active language" },
+ "weekday_headings": {
+ "type": "array",
+ "minItems": 7,
+ "maxItems": 7,
+ "items": {
+ "type": "object",
+ "required": ["name", "last"],
+ "properties": { "name": { "type": "string" }, "last": { "type": "boolean" } }
+ }
+ },
"months": { "type": "array", "items": { "$ref": "#/$defs/month" } },
"days": { "type": "array", "items": { "$ref": "#/$defs/day" } }
},
@@ -16,36 +27,43 @@
"required": ["num", "name", "days", "weeks"],
"properties": {
"num": { "type": "string" },
- "name": { "type": "object", "additionalProperties": { "type": "string" } },
+ "name": { "type": "string", "description": "the resolved display name, e.g. \"Ianuarius\"" },
"days": { "type": "array", "items": { "$ref": "#/$defs/day" } },
"weeks": { "type": "array", "items": { "$ref": "#/$defs/week" } }
}
},
"week": {
"type": "object",
- "required": ["num", "days"],
+ "required": ["num", "month_num", "month_name", "days"],
"properties": {
- "num": { "type": "string" },
- "days": { "type": "array", "minItems": 7, "maxItems": 7, "items": { "$ref": "#/$defs/day" } }
+ "num": { "type": "string" },
+ "month_num": { "type": "string", "description": "the enclosing month's num, carried here because the engine has no parent-path syntax" },
+ "month_name": { "type": "string", "description": "the enclosing month's resolved name, same reason" },
+ "days": { "type": "array", "minItems": 7, "maxItems": 7, "items": { "$ref": "#/$defs/day" } }
}
},
"day": {
"type": "object",
- "required": ["iso", "dom", "dow", "in_month", "season", "week", "slug",
- "name", "rank", "colour", "is_white", "is_red", "is_green",
- "is_violet", "is_rose", "is_black", "subject", "comms",
- "transferred_in", "transferred_out", "first", "gospel", "last"],
+ "required": ["iso", "dom", "dow", "in_month", "season", "season_name", "week",
+ "slug", "name", "weekday", "rank", "rank_name", "colour", "colour_name",
+ "is_white", "is_red", "is_green", "is_violet", "is_rose", "is_black",
+ "subject", "comms", "transferred_in", "transferred_out", "first",
+ "gospel", "last"],
"properties": {
- "iso": { "type": "string", "description": "empty on a grid padding cell" },
- "dom": { "type": "string" },
- "dow": { "type": "string", "description": "0 = Sunday" },
- "in_month": { "type": "boolean", "description": "false = grid padding cell" },
- "season": { "type": "string" },
- "week": { "type": "string", "description": "empty when the rite numbers no week here" },
- "slug": { "type": "string" },
- "name": { "type": "object", "additionalProperties": { "type": "string" } },
- "rank": { "type": "string" },
- "colour": { "type": "string", "enum": ["white","red","green","violet","rose","black",""] },
+ "iso": { "type": "string", "description": "empty on a grid padding cell" },
+ "dom": { "type": "string" },
+ "dow": { "type": "string", "description": "0 = Sunday" },
+ "in_month": { "type": "boolean", "description": "false = grid padding cell" },
+ "season": { "type": "string" },
+ "season_name": { "type": "string", "description": "the resolved season name in the active language" },
+ "week": { "type": "string", "description": "empty when the rite numbers no week here" },
+ "slug": { "type": "string", "description": "the stable machine key -- unaffected by the active language" },
+ "name": { "type": "string", "description": "the resolved display name; under --raw this equals slug" },
+ "weekday": { "type": "string", "description": "the resolved weekday name in the active language" },
+ "rank": { "type": "string" },
+ "rank_name": { "type": "string", "description": "the resolved rank name in the active language" },
+ "colour": { "type": "string", "enum": ["white","red","green","violet","rose","black",""] },
+ "colour_name": { "type": "string", "description": "the resolved colour name in the active language" },
"is_white": { "type": "boolean" }, "is_red": { "type": "boolean" },
"is_green": { "type": "boolean" }, "is_violet":{ "type": "boolean" },
"is_rose": { "type": "boolean" }, "is_black": { "type": "boolean" },
@@ -57,7 +75,7 @@
"required": ["slug", "name", "privileged"],
"properties": {
"slug": { "type": "string" },
- "name": { "type": "object", "additionalProperties": { "type": "string" } },
+ "name": { "type": "string", "description": "the resolved display name, same table as the day's own name" },
"privileged": { "type": "boolean" }
}
}