Commit a924eacc authored by mrodzis's avatar mrodzis 🌿
Browse files

feat: add rightsType@type (incl. Schematron rules)

parent 6e3bd111
......@@ -95,6 +95,38 @@
</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>rightsType@type: generic or specific type</sch:title>
<sch:p>A LIDO element holding lido:rightsType can either hold a generic or a specific type of right.
Since a right can fall in only one of these categories, they are mutually exclusive.</sch:p>
<sch:rule abstract="true" id="rightsType">
<sch:assert role="warn"
test="@lido:type = 'http://terminology.lido-schema.org/lido00920'
and not(following-sibling::lido:rightsType/@lido:type = 'http://terminology.lido-schema.org/lido00921'
or preceding-sibling::lido:rightsType/@lido:type = 'http://terminology.lido-schema.org/lido00921')
or @lido:type = 'http://terminology.lido-schema.org/lido00921'
and not(following-sibling::lido:rightsType/@lido:type = 'http://terminology.lido-schema.org/lido00920'
or preceding-sibling::lido:rightsType/@lido:type = 'http://terminology.lido-schema.org/lido00920')">
<sch:value-of select="parent::*/name()"/> can either hold a specific or a generic lido:rightsType (mutually exclusive).
</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Possible values for lido:rightsType@lido:type</sch:title>
<sch:p>In LIDOv1.1 a lido:type attribute is introduced for lido:rightsType in order to discern generic rights and specific ones.
This rule ensures that only the URIs for these two types of rights are used when @lido:type is set.</sch:p>
<sch:rule abstract="true" id="rightsType_type">
<sch:assert role="warn"
test="(@lido:type = 'http://terminology.lido-schema.org/lido00920' or @lido:type = 'http://terminology.lido-schema.org/lido00921')
or not(@lido:type)">
@lido:type can either be omitted or must hold one of the following URIs: http://terminology.lido-schema.org/lido00920, http://terminology.lido-schema.org/lido00921.
</sch:assert>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:schema>
......@@ -5990,6 +5990,8 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule context="lido:rightsType">
<sch:extends rule="SKOS"/>
<sch:extends rule="rightsType_type"/>
<sch:extends rule="rightsType"/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment