This document describes the ShEx Test Vocabulary and Term definitions used for writing the tests of Shape Expressions [[shex-semantics]] implementations. This document provides the RDFS [[RDF-SCHEMA]] vocabulary definition and a description of the JSON-LD context definition for use with writing test manifests in JSON-LD or YAML-LD.
Alternate versions of the vocabulary definition exist in
Turtle and
JSON-LD,
which also includes the @context a JSON-LD or YAML-LD test manifest references, after the ShEx manifest vocabulary's.
FIXME
This document describes the RDFS vocabulary in which the tests of a ShEx conformance suite say what they say beyond an entry of the ShEx manifest vocabulary [[shex-manifest]] -- the features of ShEx a test exercises, whether it is approved, how its schema must be rejected and where, the schema's other representations, and what its semantic actions must output [[shex-semantics]] -- along with the JSON-LD Context that a test manifest stacks on the manifest vocabulary's, so that a JSON or YAML test manifest is an RDF graph.
This specification makes use of the following namespaces:
shexTest:http://www.w3.org/ns/shex-test#shexMan:http://www.w3.org/ns/shex-manifest#prov:http://www.w3.org/ns/prov#rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#rdfs:http://www.w3.org/2000/01/rdf-schema#xsd:http://www.w3.org/2001/XMLSchema#The following are class definitions in the shexTest namespace:
The following are property definitions in the shexTest namespace:
| approval |
approval
§
What the community has decided about the test itself: "Approved" or "Proposed".
|
| endColumn |
end column
§
The 1-based column at which the expected rejection ends.
|
| endRow |
end row
§
The 1-based row at which the expected rejection ends.
|
| result |
result
§
The results the validation must produce, for a test that says more than conformant or nonconformant. A literal is their text; an IRI (written with the term resultURL) is the document that holds them.
|
| sameSemanticsAs |
same semantics as
§
Another test whose schema means what this one's does, however differently it is written.
|
| schemaError |
schema error
§
How the test's schema must be rejected: "syntax", when it does not parse, or "structure", when it parses but breaks a structural constraint, such as referring to a shape it does not declare. An entry with neither a schemaError nor a status tests the schema's representations (shexc, shexj, shexr).
|
| semActs |
semantic actions
§
Code for the semantic actions the test's schema names without code of their own. A literal is its text; an IRI (written with the term semActsURL) is the document that holds it.
|
| shapeExterns |
shape externs
§
A schema providing the shapes the test's schema declares EXTERNAL. A literal is its text; an IRI (written with the term shapeExternsURL) is the document that holds it.
|
| shexc |
ShExC
§
The test's schema in ShExC, the compact syntax of ShEx. A literal is its text; an IRI (written with the term shexcURL) is the document that holds it.
|
| shexj |
ShExJ
§
The test's schema in ShExJ, the JSON representation of ShEx. A literal is its text; an IRI (written with the term shexjURL) is the document that holds it.
|
| shexr |
ShExR
§
The test's schema in ShExR, the RDF representation of ShEx. A literal is its text; an IRI (written with the term shexrURL) is the document that holds it.
|
| startColumn |
start column
§
The 1-based column at which the expected rejection begins.
|
| startRow |
start row
§
The 1-based row of the schema's text at which the rejection a negative test expects begins.
|
| trait |
trait
§
A feature of ShEx the test exercises, as a plain name (Empty, TriplePattern, Import, SemanticAction, ...), so that an implementation can tell which tests bear on what it supports.
|
The following are datatype definitions in the shexTest namespace:
The following are instance definitions in the shexTest namespace: