diff --git a/test/schema/.gitignore b/test/schema/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..3cc1982e165c1a0fc6cfd2fa87298efaba6d9ab3 --- /dev/null +++ b/test/schema/.gitignore @@ -0,0 +1 @@ +*-compiled.xspec \ No newline at end of file diff --git a/test/schema/common.xspec b/test/schema/common.xspec new file mode 100644 index 0000000000000000000000000000000000000000..69b2d9dedbf1e53d4998ff64f8558c88cbf7f838 --- /dev/null +++ b/test/schema/common.xspec @@ -0,0 +1,35 @@ +<xspec:description xmlns:xspec="http://www.jenitennison.com/xslt/xspec" schematron="common.sch"> + + <xspec:scenario label="Verwende <owl:sameAs> für Statements zu Entitäten, die nicht unter der Kontrolle der HAB liegen"> + <xspec:scenario label="Regel trifft zu"> + <xspec:context xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <Entity rdf:about="http://example.hab.de/entity"/> + </xspec:context> + <xspec:expect-not-assert id="internalEntity_001"/> + </xspec:scenario> + <xspec:scenario label="Regel nicht trifft zu"> + <xspec:context xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <Entity rdf:about="http://hab.example.de/entity"/> + </xspec:context> + <xspec:expect-assert id="internalEntity_001"/> + </xspec:scenario> + </xspec:scenario> + + <xspec:scenario label="Verwende @rdf:about für Statements zu Entitäten, die unter der Kontrolle der HAB liegen"> + <xspec:scenario label="Regel trifft zu"> + <xspec:context xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <Entity rdf:about="http://example.hab.de/entity"/> + </xspec:context> + <xspec:expect-not-assert id="externalEntity_001"/> + </xspec:scenario> + <xspec:scenario label="Regel nicht trifft zu"> + <xspec:context xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <Entity xmlns:owl="http://www.w3.org/2002/07/owl#"> + <owl:sameAs rdf:resource="http://example.hab.de/entity"/> + </Entity> + </xspec:context> + <xspec:expect-assert id="externalEntity_001"/> + </xspec:scenario> + </xspec:scenario> + +</xspec:description> diff --git a/test/schema/vocab.xspec b/test/schema/vocab.xspec new file mode 100644 index 0000000000000000000000000000000000000000..0e536c78299840d27249e32dc068ef574b6de783 --- /dev/null +++ b/test/schema/vocab.xspec @@ -0,0 +1,26 @@ +<xspec:description xmlns:xspec="http://www.jenitennison.com/xslt/xspec" schematron="vocab.sch"> + <xspec:scenario label="Das Konzept muss zu einem Ordnungssystem gehören, dass in der Vokabulardatei definiert ist."> + <xspec:scenario label="Regel trifft zu"> + <xspec:context xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:skos="http://www.w3.org/2004/02/skos/core#"> + <rdf:RDF> + <skos:ConceptScheme rdf:about="http://example.hab.de/scheme"/> + <skos:Concept> + <skos:inScheme rdf:resource="http://example.hab.de/scheme"/> + </skos:Concept> + </rdf:RDF> + </xspec:context> + <xspec:expect-not-assert id="skos.inScheme_001"/> + </xspec:scenario> + <xspec:scenario label="Regel trifft nicht zu"> + <xspec:context xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:skos="http://www.w3.org/2004/02/skos/core#"> + <rdf:RDF> + <skos:ConceptScheme rdf:about="http://example.hab.de/scheme"/> + <skos:Concept> + <skos:inScheme rdf:resource="http://example.hab.de/other"/> + </skos:Concept> + </rdf:RDF> + </xspec:context> + <xspec:expect-assert id="skos.inScheme_001"/> + </xspec:scenario> + </xspec:scenario> +</xspec:description>