Commit 8b7ec2bb authored by mrodzis's avatar mrodzis 🌎
Browse files

fix: move Schematron rules for rightsType to schema

parent a924eacc
......@@ -95,38 +95,6 @@
</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>
......@@ -155,6 +155,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>
......
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