diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 08:57:42 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 08:57:42 +0200 |
| commit | 544836cf0f6373a0a753d0953ce7e60fd96337af (patch) | |
| tree | a3d22c5d754c435ad2e65203d60690e6b1dea039 /schema/colitur-v1.xsd | |
| parent | 9608e49a0956c8228a022454751765404d46daa5 (diff) | |
| download | colitur-544836cf0f6373a0a753d0953ce7e60fd96337af.tar.gz colitur-544836cf0f6373a0a753d0953ce7e60fd96337af.zip | |
feat(render): XML emitter and schema
Element-per-field; attributes carry identity only and there is no mixed
content, so a consumer's XPath never has to distinguish the two.
Schema validation is an opt-in make check-schema via xmllint, not an
in-suite assertion: validating XSD needs an XML library and the
dependency list is frozen. It prints SKIPPED loudly when xmllint is
absent, because a silent skip reads as a pass. The suite asserts
well-formedness properties directly instead.
This corrects the design spec, which claimed in-test validation.
Diffstat (limited to 'schema/colitur-v1.xsd')
| -rw-r--r-- | schema/colitur-v1.xsd | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/schema/colitur-v1.xsd b/schema/colitur-v1.xsd new file mode 100644 index 0000000..46af9a9 --- /dev/null +++ b/schema/colitur-v1.xsd @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:element name="calendar"> + <xs:complexType> + <xs:sequence> + <xs:element name="days"> + <xs:complexType> + <xs:sequence> + <xs:element name="day" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="season" type="xs:string"/> + <xs:element name="week" type="xs:string"/> + <xs:element name="slug" type="xs:string"/> + <xs:element name="rank" type="xs:string"/> + <xs:element name="colour" 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> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="part" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="date" type="xs:string" use="required"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="rite" type="xs:string" use="required"/> + <xs:attribute name="year" type="xs:string" use="required"/> + </xs:complexType> + </xs:element> +</xs:schema> |
