PREFIX ex:      <http://example.org/>

PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sh:      <http://www.w3.org/ns/shacl#>
PREFIX srl:     <http://www.w3.org/ns/shacl-rules#>
PREFIX owl:     <http://www.w3.org/2002/07/owl#>
PREFIX dc:      <http://purl.org/dc/elements/1.1/>

<> a owl:Ontology ;
    dc:title "The SHACL Rules Language Vocabulary (SRL)" ;
    dc:date "2026-12-31" ;
    dc:description "This is the RDF Schema for SHACL Rules." ;
    rdfs:seeAlso <https://w3c.org/TR/shacl12-rules> .

#### SHACL Rules Syntax

## -- Classes

srl:RuleSet rdf:type rdfs:Class ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-rule-set> ;
    rdfs:label "Rule Set" ;
    rdfs:comment "The class of rule sets." .

srl:Rule rdf:type rdfs:Class ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-rule> ;
    rdfs:label "A SHACL Rule" ;
    rdfs:comment "The class of SHACL Rules." .

## -- Properties

srl:rules rdf:type rdf:Property ;
    rdfs:domain srl:RuleSet ;
    # range - list of rules
    rdfs:isDefinedBy srl: ;
    rdfs:label "Rules of a Rule Set" ;
    rdfs:comment "The list of rules of the rule set." .

srl:data rdf:type rdf:Property ;
    rdfs:domain srl:RuleSet ;
    # range - list
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-data-block> ;
    rdfs:label "Data" ;
    rdfs:comment "The list of data of the rule set." .

srl:head rdf:type rdf:Property ;
    rdfs:domain srl:Rule ;
    # range - list of triple templates
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-rule-head> ;
    rdfs:label "Rule head" ;
    rdfs:comment "The consequent of a rule." .
    
srl:body rdf:type rdf:Property ;
    rdfs:domain srl:Rule ;
    # range : list of rule elements
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-rule-body> ;
    rdfs:label "Rule body" ;
    rdfs:comment "The antecedent of a rule." .

## -- Rule Body

srl:RuleElement rdf:type rdfs:Class ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-rule-body-element> ;
    rdfs:label "A SHACL Rule Element" ;
    rdfs:comment "The class of SHACL Rule Elements." .

srl:TriplePattern rdf:type rdfs:Class ;
    rdfs:subClassOf srl:RuleElement ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-triple-pattern> ;
    rdfs:label "A SHACL Triple Pattern" ;
    rdfs:comment "The class of triple patterns." .

srl:ConditionElement rdf:type rdfs:Class ;
    rdfs:subClassOf srl:RuleElement ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-condition-element> ;
    rdfs:label "A SHACL Rule condition element" ;
    rdfs:comment "The class of SHACL condition elements." .

srl:AssignmentElement rdf:type rdfs:Class ;
    rdfs:subClassOf srl:RuleElement ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-assignment-element> ;
    rdfs:label "A SHACL Rule assignment element" ;
    rdfs:comment "The class of SHACL assignment elements." .

srl:NegationElement  rdf:type rdfs:Class ;
    rdfs:subClassOf srl:RuleElement ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#dfn-negation-element> ;
    rdfs:label "A SHACL Rule negation element" ;
    rdfs:comment "The class of SHACL negation elements." .

## ----

srl:filter rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:label "filter" ;
    rdfs:comment "A filter rule element" .

## @@Remove
srl:assign rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:label "assign" ;
    rdfs:comment "An assignment rule element" .
    

srl:assignVar rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:label "assignment variable" ;
    rdfs:comment "The variable of an assignment" .
    
srl:assignValue rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:label "assignment value" ;
    rdfs:comment "The value or expression for an assignment" .
    
srl:not rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:label "negation rule element" ;
    rdfs:comment "A negation rule element" .
    
## ----

srl:subject rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:range rdfs:Resource ;
    rdfs:label "subject" ;
    rdfs:comment "The subject of a triple, triple pattern or triple template." .

srl:predicate rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:range rdfs:Resource ;
    rdfs:label "predicate" ;
    rdfs:comment "The predicate of a triple, triple pattern or triple template." .

srl:object rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:range rdfs:Resource ;
    rdfs:label "object" ;
    rdfs:comment "The object of a triple, triple pattern or triple template." .

srl:varName rdf:type rdf:Property ;
    rdfs:isDefinedBy srl: ;
    rdfs:isDefinedBy <https://www.w3.org/TR/shacl12-rules/#rdf-rules-syntax> ;
    rdfs:label "name of a variable" ;
    rdfs:comment "Name of a variable." .
