Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LIDO
lido-development
Commits
35a56a78
Commit
35a56a78
authored
Oct 20, 2020
by
mrodzis
🌿
Browse files
Feature/schematron
parent
2c953a75
Changes
2
Hide whitespace changes
Inline
Side-by-side
1.1/lido-qa.xsd
0 → 100644
View file @
35a56a78
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:lido=
"http://www.lido-schema.org"
xmlns:lido-qa=
"http://www.lido-schema.org/quality-assurance"
xmlns:sch=
"http://purl.oclc.org/dsdl/schematron"
xmlns:skos=
"http://www.w3.org/2004/02/skos/core#"
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:xml=
"http://www.w3.org/XML/1998/namespace"
targetNamespace=
"http://www.lido-schema.org/quality-assurance"
elementFormDefault=
"qualified"
attributeFormDefault=
"qualified"
>
<!--
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx This is an additional schema for LIDO v1.1. It is to be understood as complementary tool for
xx assuring the quality of LIDO records. This means it is not obligatory to use this schema when
xx validating your files; some rules, however, will warn you about changes in the upcoming LIDO v2.0
xx which are not backwards compatible.
xx
xx This document implements the Schematron error roles as follows::
xx * "info": highlights elements which will be deprecated in the next LIDO version
xx * "warn": points out data values or elements that are correct according to the LIDO schema but
xx could/should be improved
xx
xx Prepared for CIDOC Working Group Data Harvesting and Interchange, CDWA Lite/museumdat Working Group,
xx Collections Trust and Deutscher Museumsbund - Fachgruppe Dokumentation by:
xx Michelle Weidling – Niedersaechsische Staats- und Universitaetsbiblithek Goettingen
xx
xx Copyright (c) 2020 ICOM-CIDOC for the Data Harvesting and Interchange Working Group.
xx These are licensed under the Creative Commens Attribution 4.0 International (CC BY 4.0) license.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-->
<xs:annotation>
<xs:appinfo>
<sch:ns
uri=
"http://www.lido-schema.org"
prefix=
"lido"
/>
<sch:ns
uri=
"http://www.w3.org/2002/07/owl#"
prefix=
"owl"
/>
<sch:ns
uri=
"http://www.w3.org/2004/02/skos/core#"
prefix=
"skos"
/>
<sch:title>
Abstract Schematron rules for quality assurance
</sch:title>
<sch:pattern>
<sch:title>
Deprecation Warning: Controlled vocabulary instead of free text
</sch:title>
<sch:p>
In upcoming versions of LIDO some element won't allow for free text anymore but will require terms
taken from a (local) controlled vocabulary. This should improve the interoperability of the data and recall rates
in aggregating web services.
</sch:p>
<sch:rule
abstract=
"true"
id=
"MixedContentInfo"
>
<sch:report
test=
"text()[matches(., '[\w]')]"
role=
"info"
>
In upcoming versions of LIDO
<sch:name/>
will only allow for skos:Concept, lido:conceptID and lido:term as child elements.
The use of free text will be deprecated.
</sch:report>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>
@pref: Discern preferred and alternative elements
</sch:title>
<sch:p>
If there is more than one element holding a @pref, alternatives as well as the preferred element should be indicated.
This isn't stated clearly in the LIDO v1.0 schema documentation but should be kept in mind when indexing objects; otherwise the preferred
variant might be unclear to a data user. Also, omitting this attribute contradicts international best practices for retrieval quality.
</sch:p>
<sch:rule
abstract=
"true"
id=
"pref"
>
<sch:let
name=
"current"
value=
"current()"
/>
<sch:let
name=
"currentName"
value=
"$current/name()"
/>
<sch:let
name=
"parent"
value=
"$current/.."
/>
<sch:let
name=
"lang"
value=
"$current/@xml:lang/string()"
/>
<sch:let
name=
"siblings"
value=
"$parent/child::*[name(.) = $currentName and (@xml:lang/string() = $lang or not(@xml:lang or $current/@xml:lang))]"
/>
<sch:report
test=
"
count($siblings) gt 1 and
not($siblings/@lido:pref = 'preferred') and
not($siblings/@lido:pref = 'alternative' and $siblings/@lido:pref = 'alternate')"
role=
"warn"
>
When providing more than one
<sch:name/>
the preferred and alternative variant(s) should be cleary marked as such via @pref.
</sch:report>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>
@pref: "alternative" instead of "alternate"
</sch:title>
<sch:p>
LIDO v1.0 falsely suggests the value 'alternate' for the pref attribute. It is established to use 'alternative' in this context.
</sch:p>
<sch:rule
abstract=
"true"
id=
"alternate"
>
<sch:report
test=
"@lido:pref = 'alternate'"
role=
"warn"
>
It is established to use 'alternative' instead of 'alternate' in this context. Consider changing the attribute's value or using the corresponding
LIDO terminology, http://terminology.lido-schema.org/pref and http://terminology.lido-schema.org/alternative, instead.
</sch:report>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>
xs:dateTime Dates
</sch:title>
<sch:p>
Check if a given string complies to the ISO 8601 date convention. This pattern is used for
the cases where an element allows for xs:string in LIDO v1.0 while providing a date.
</sch:p>
<sch:rule
abstract=
"true"
id=
"DateTime"
>
<sch:assert
role=
"warn"
test=
"matches(., '-?[0-9]{4}-(0[1-9]|1[12])-([0][1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3])(:[0-5][0-9]){2}(Z|(\+|\-)(0[0-9]|1[12])(:[0-5][0-9])?)')"
>
The date provided in
<sch:name/>
should comply to the format [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm].
</sch:assert>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:schema>
1.1/lido-v1.1-draft.xsd
View file @
35a56a78
...
...
@@ -107,13 +107,11 @@
schemaLocation=
"http://www.w3.org/2001/03/xml.xsd"
/>
<xs:import
namespace=
"http://www.opengis.net/gml"
schemaLocation=
"minified-gml.xsd"
/>
<xs:import
namespace=
"http://www.lido-schema.org/quality-assurance"
schemaLocation=
"lido-qa.xsd"
/>
<xs:annotation>
<xs:appinfo>
<sch:ns
uri=
"http://www.lido-schema.org"
prefix=
"lido"
/>
<sch:ns
uri=
"http://www.w3.org/2002/07/owl#"
prefix=
"owl"
/>
<sch:ns
uri=
"http://www.w3.org/2004/02/skos/core#"
prefix=
"skos"
/>
<xs:appinfo>
<sch:title>
Abstract Schematron rules
</sch:title>
<sch:pattern>
<sch:title>
Allow free text or LIDO's concept elements (mutually exclusive)
</sch:title>
...
...
@@ -157,18 +155,6 @@
</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>
xs:dateTime Dates
</sch:title>
<sch:p>
Check if a given string complies to the ISO 8601 date convention. This pattern is used for
the cases where an element allows for xs:string in LIDO v1.0 while providing a date.
</sch:p>
<sch:rule
abstract=
"true"
id=
"DateTime"
>
<sch:assert
role=
"warn"
test=
"matches(., '-?[0-9]{4}-(0[1-9]|1[12])-([0][1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3])(:[0-5][0-9]){2}(Z|(\+|\-)(0[0-9]|1[12])(:[0-5][0-9])?)')"
>
The date provided in
<sch:name/>
should comply to the format [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm].
</sch:assert>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
...
...
@@ -233,6 +219,15 @@
</tei:ref>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:actorID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"nameActorSet"
type=
"lido:appellationComplexType"
maxOccurs=
"unbounded"
id=
"nameActorSet"
>
...
...
@@ -476,10 +471,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:genderActor"
>
<sch:extends
rule=
"MixedContent"
/>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:rule
context=
"lido:genderActor"
>
<sch:extends
rule=
"MixedContentInfo"
/>
<sch:extends
rule=
"SKOS"
/>
</sch:rule>
</sch:pattern>
...
...
@@ -664,10 +656,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:attributionQualifierActor"
>
<sch:extends
rule=
"MixedContent"
/>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:rule
context=
"lido:attributionQualifierActor"
>
<sch:extends
rule=
"MixedContentInfo"
/>
<sch:extends
rule=
"SKOS"
/>
</sch:rule>
</sch:pattern>
...
...
@@ -707,10 +696,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:extentActor"
>
<sch:extends
rule=
"MixedContent"
/>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:rule
context=
"lido:extentActor"
>
<sch:extends
rule=
"MixedContentInfo"
/>
<sch:extends
rule=
"SKOS"
/>
</sch:rule>
</sch:pattern>
...
...
@@ -1044,6 +1030,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:appellationValue"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
...
...
@@ -1608,6 +1602,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<tei:item>
[none]
</tei:item>
</tei:list>
</tei:ab>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:descriptiveNoteID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:documentation>
</xs:annotation>
</xs:element>
...
...
@@ -1857,6 +1859,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:ref>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:eventID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"eventType"
type=
"lido:conceptComplexType"
id=
"eventType"
>
...
...
@@ -2841,6 +2851,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:legalBodyID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"legalBodyName"
type=
"lido:appellationComplexType"
minOccurs=
"0"
...
...
@@ -2885,6 +2903,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:legalBodyWeblink"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
...
...
@@ -2957,6 +2983,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:lidoRecID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"objectPublishedID"
type=
"lido:identifierComplexType"
minOccurs=
"0"
...
...
@@ -2984,6 +3018,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:objectPublishedID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"category"
type=
"lido:conceptComplexType"
minOccurs=
"0"
id=
"category"
>
...
...
@@ -3054,6 +3096,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:applicationProfile"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<!-- end element applicationProfile added - 2018-04-12 -->
...
...
@@ -3226,10 +3276,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:extentMaterialsTech"
>
<sch:extends
rule=
"MixedContent"
/>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:rule
context=
"lido:extentMaterialsTech"
>
<sch:extends
rule=
"MixedContentInfo"
/>
<sch:extends
rule=
"SKOS"
/>
</sch:rule>
</sch:pattern>
...
...
@@ -3411,10 +3458,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:measurementType"
>
<sch:extends
rule=
"MixedContent"
/>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:rule
context=
"lido:measurementType"
>
<sch:extends
rule=
"MixedContentInfo"
/>
<sch:extends
rule=
"SKOS"
/>
</sch:rule>
</sch:pattern>
...
...
@@ -3454,10 +3498,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:measurementUnit"
>
<sch:extends
rule=
"MixedContent"
/>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:rule
context=
"lido:measurementUnit"
>
<sch:extends
rule=
"MixedContentInfo"
/>
<sch:extends
rule=
"SKOS"
/>
</sch:rule>
</sch:pattern>
...
...
@@ -3628,6 +3669,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:objectWebResource"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"objectID"
type=
"lido:identifierComplexType"
minOccurs=
"0"
...
...
@@ -3650,6 +3699,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:objectID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<!-- bleibt Freitext -->
...
...
@@ -3920,6 +3977,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:extentMeasurements"
>
<sch:extends
rule=
"MixedContent"
/>
<sch:extends
rule=
"MixedContentInfo"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
...
...
@@ -4496,6 +4554,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:placeID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"namePlaceSet"
type=
"lido:appellationComplexType"
minOccurs=
"0"
...
...
@@ -4843,6 +4909,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:recordInfoID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"recordInfoLink"
type=
"lido:webResourceComplexType"
minOccurs=
"0"
...
...
@@ -4865,6 +4939,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:recordInfoLink"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"recordMetadataDate"
minOccurs=
"0"
maxOccurs=
"unbounded"
id=
"recordMetadataDate"
>
...
...
@@ -4958,6 +5040,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:recordID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"recordType"
type=
"lido:conceptComplexType"
id=
"recordType"
>
...
...
@@ -5635,6 +5725,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:resourceID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"resourceRepresentation"
minOccurs=
"0"
maxOccurs=
"unbounded"
id=
"resourceRepresentation"
>
...
...
@@ -5686,6 +5784,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
</tei:list>
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:linkResource"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
...
...
@@ -6362,10 +6468,7 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
<sch:pattern>
<sch:rule
context=
"lido:extentConcept"
>
<sch:extends
rule=
"MixedContent"
/>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:rule
context=
"lido:extentConcept"
>
<sch:extends
rule=
"MixedContentInfo"
/>
<sch:extends
rule=
"SKOS"
/>
</sch:rule>
</sch:pattern>
...
...
@@ -6803,6 +6906,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
controlled vocabulary.
</tei:ab>
<tei:ab
type=
"title"
>
Concept Identifier
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:conceptID"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element
name=
"term"
type=
"lido:termComplexType"
minOccurs=
"0"
maxOccurs=
"unbounded"
id=
"term"
>
...
...
@@ -6812,6 +6923,14 @@ target="https://www.getty.edu/research/tools/vocabularies/guidelines/ulan_3_6_bi
indexing.
</tei:ab>
<tei:ab
type=
"title"
>
Term/Label
</tei:ab>
</xs:documentation>
<xs:appinfo>
<sch:pattern>
<sch:rule
context=
"lido:term"
>
<sch:extends
rule=
"pref"
/>
<sch:extends
rule=
"alternate"
/>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment