@prefix xsd: 	 <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: 	 <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: 	 <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: 	 <http://www.w3.org/2002/07/owl#> .

@prefix skos: 	 <http://www.w3.org/2004/02/skos/core#> .
@prefix vann: 	 <http://purl.org/vocab/vann/> .
@prefix dc: 	 <http://purl.org/dc/elements/1.1/> .
@prefix foaf: 	 <http://xmlns.com/foaf/0.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix cc:      <http://creativecommons.org/ns#> .
@prefix sh:      <http://www.w3.org/ns/shacl#> .
@prefix shsh:    <http://www.w3.org/ns/shacl-shacl#> .

@prefix ex:      <http://example.net/ns#> .

@prefix ottr:    <http://ns.ottr.xyz/0.4/> .

@prefix wottr-doc: <http://spec.ottr.xyz/wOTTR/> .
@prefix wottr-ver: <http://spec.ottr.xyz/wOTTR/0.5.0/> .
@prefix o-wottr: <http://spec.ottr.xyz/wOTTR/0.5.0/tpl/> .
@prefix mottr-ver: <http://spec.ottr.xyz/mOTTR/0.1.3/> .
@prefix o-mottr: <http://spec.ottr.xyz/mOTTR/0.1.3/tpl/> .
@prefix rottr-ver: <http://spec.ottr.xyz/rOTTR/0.2.3/> .
@prefix o-rottr: <http://spec.ottr.xyz/rOTTR/0.2.3/tpl/> .
ottr:VocabularyTokenShape a sh:NodeShape ;
  sh:targetNode ex:ANY_NODE ; ## matches any node
  sh:sparql [ a sh:SPARQLConstraint ;
    sh:select """
    PREFIX ottr: <http://ns.ottr.xyz/0.4/>
    SELECT ?value 
    WHERE { { ?value ?p ?o }
      UNION { ?s ?value ?o }
      UNION { ?s ?p ?value }
    FILTER (isIRI(?value) && STRSTARTS(STR(?value), "http://ns.ottr.xyz/0.4/"))
    FILTER (?value NOT IN ( ottr:IRI, ottr:Bot, ottr:NEList, ottr:LUB,
    ottr:introducedIn, ottr:changedIn, ottr:deprecatedIn,
    ottr:ArgumentModifier, ottr:Argument, ottr:BaseTemplate, ottr:ExpansionModifier, ottr:Instance, ottr:NullableTriple, ottr:ParameterModifier, ottr:Parameter, ottr:Signature, ottr:Status, ottr:Template, ottr:Triple, ottr:annotation, ottr:arguments, ottr:candidate, ottr:cross, ottr:default, ottr:deprecated, ottr:draft, ottr:incomplete, ottr:listExpand, ottr:modifier, ottr:name, ottr:nonBlank, ottr:none, ottr:of, ottr:optional, ottr:parameters, ottr:pattern, ottr:proposedRecommendation, ottr:recommendation, ottr:status, ottr:type, ottr:values, ottr:value, ottr:variable, ottr:zipMax, ottr:zipMin
    
    ) )
    }
    """ ;
    ] ;
  sh:name "OTTR vocabulary element." ;
  sh:message "Unrecognised OTTR vocabulary element. Check spelling." 
.
