From 970b3594bf987c30db01876ec2a750d0056bb476 Mon Sep 17 00:00:00 2001 From: David Maus <maus@hab.de> Date: Wed, 18 Oct 2017 14:36:36 +0200 Subject: [PATCH] =?UTF-8?q?XSpec=20f=C3=BCr=20Schematron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/schema/.gitignore | 1 + test/schema/common.xspec | 35 +++++++++++++++++++++++++++++++++++ test/schema/vocab.xspec | 26 ++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 test/schema/.gitignore create mode 100644 test/schema/common.xspec create mode 100644 test/schema/vocab.xspec diff --git a/test/schema/.gitignore b/test/schema/.gitignore new file mode 100644 index 00000000..3cc1982e --- /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 00000000..69b2d9de --- /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 00000000..0e536c78 --- /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> -- GitLab