W3C First Public Working Draft
Copyright © 2025 World Wide Web Consortium. W3C® liability, trademark and permissive document license rules apply.
This document describes Shapes Constraint Language (SHACL) Rules.
This specification is published by the Data Shapes Working Group .
This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C standards and drafts index.
This document was published by the Data Shapes Working Group as a First Public Working Draft using the Recommendation track.
Publication as a First Public Working Draft does not imply endorsement by W3C and its Members.
This is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to cite this document as other than a work in progress. Future updates to this upcoming Recommendation may incorporate new features.
This document was produced by a group operating under the W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent that the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This document is governed by the 18 August 2025 W3C Process Document.
This specification is part of the SHACL 1.2 family of specifications. See the SHACL 1.2 Overview for a more detailed introduction to them.
The specifications are as follows:
This document introduces the concept of inference rules for SHACL 1.2, a mechanism for deriving new RDF triples from existing data using declarative rules defined in shapes graphs. This extends SHACL’s capabilities beyond validation, enabling reasoning and data enrichment.
This document complements other SHACL 1.2 specifications, such as SHACL Core, by defining the syntax and semantics of rule-based inference. While SHACL Core focuses on constraint validation, the SHACL Rules specification provides a standardized way to express and evaluate rules that generate new data.
Connect to definitions in RDF 1.2 Concepts.
The following definitions from other specifications are used in this document: @@
Some examples in this document use Turtle [turtle]. The reader is expected to be familiar with SHACL [shacl] and SPARQL [sparql-query].
Within this document, the following namespace prefix bindings are used:
| Prefix | Namespace |
|---|---|
rdf: |
http://www.w3.org/1999/02/22-rdf-syntax-ns# |
rdfs: |
http://www.w3.org/2000/01/rdf-schema# |
sh: |
http://www.w3.org/ns/shacl# |
shrl: |
http://www.w3.org/ns/shacl-rules# |
shnex: |
http://www.w3.org/ns/shacl-node-expr# |
xsd: |
http://www.w3.org/2001/XMLSchema# |
ex: |
http://example.com/ |
Throughout the document, color-coded boxes containing RDF graphs in Turtle will appear. These fragments of Turtle documents use the prefix bindings given above.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
TODO
RFC 2119 language should autmatically be inserted here.
SHACL rules infer new triples. The input is a data graph and a set of rules. The output is a graph of inferred triples that do not occur in the data graph.
:A :fatherOf :X .
:B :motherOf :X .
:C :motherOf :A .
RULE { ?x :childOf ?y } WHERE { ?y :fatherOf ?x }
RULE { ?x :childOf ?y } WHERE { ?y :motherOf ?x }
RULE { ?x :descendedFrom ?y } WHERE { ?x :childOf ?y }
RULE { ?x :descendedFrom ?y } WHERE { ?x :childOf ?z . ?z :childOf ?y }
The above rules, applied to the data, will conclude
that: :X is the :childOf :A and :B, and that :X is :descendedFrom :C.
RULE { ?x :ancestorOf ?y } WHERE { ?y :descendedFrom ?x }
RULE { ?a :ancestorOf ?b } WHERE { ?a :ancestorOf ?c . ?c :ancestorOf ?b }
# Default value - calculate a name
RULE { ?x :name ?FN } WHERE {
?x rdf:type :Person
NOT { ?x :name ?someName }
?x :givenName ?name1 ;
:familyName ?name2 .
BIND(concat(?name1, " ", ?name2) AS ?FN)
}
The Shape Rules Abstract Syntax
An expression is a function, or functional form. It's arguments are RDF terms. An expression is evaluated with respect to a solution mapping to give an RDF term as the result. Expressions are compatible with SHACL list parameter functions and with SPARQL expressions.
In a triple pattern or a triple template, position 1 of the tuple is informally called the subject, position 2 is informally called the predicate, and position 3 is informally called the object.
Stratification is the process of labelling rules based on their dependency relationships in a rule set. The set of rules with the same label are called a layer.
E depends on a rule R if the head of rule R
contains a triple template that may provide a triple that is matched by
a triple pattern in E.
R1 depends on rule R2 if any rule element of R1 depends on R2.
Process
Conditions
Well-formedness is a set of conditions on the abstract syntax of shapes rules. Together, these rules ensure that a variable in the head of a rule has a value defined in the body of the rule; that each variable in an condition expression or assignment expression has a value at the point of evaluation; and that each assignment in a rule introduces a new variable, not used earlier in the rule body.
Add a rule for nested patterns e.g. negation.
A rule is a well-formed rule if all of the following conditions are met:
A rule set is "well-formed" if and only if all of the rules of the rule set are "well-formed".
There are two concrete syntaxes.
The Shape Rules Language (SRL) syntax has an equivalent RDF syntax form. Well-formed RDF syntax can be translated to the Shape Rules Language syntax.
Shape Rules Language:
PREFIX : <http://example/>
DATA { :x :p 1 ; :q 2 . }
RULE { ?x :bothPositive true . }
WHERE { ?x :p ?v1 FILTER ( ?v1 > 0 ) ?x :q ?v2 FILTER ( ?v2 > 0 ) }
RULE { ?x :oneIsZero true . }
WHERE { ?x :p ?v1 ; :q ?v2 FILTER ( ( ?v1 = 0 ) || ( ?v2 = 0 ) ) }
RDF Rules syntax:
PREFIX : <http://example/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX shrl: <http://www.w3.org/ns/shacl-rules#>
PREFIX sparql: <http://www.w3.org/ns/sparql#>
:ruleSet-1
rdf:type shrl:RuleSet;
shrl:data (
<<( :x :p 1 )>>
<<( :x :q 2 )>>
);
shrl:ruleSet (
[
rdf:type shrl:Rule;
shrl:head (
[ shrl:subject [ shrl:var "x" ] ; shrl:predicate :bothPositive; shrl:object true ]
) ;
shrl:body (
[ shrl:subject [ shrl:var "x" ]; shrl:predicate :p; shrl:object [ shrl:var "v1" ] ]
[ shrl:expr [ sparql:greaterThan ( [ shrl:var "v1" ] 0 ) ] ]
[ shrl:subject [ shrl:var "x" ] ; shrl:predicate :q; shrl:object [ shrl:var "v2" ] ]
[ shrl:expr [ sparql:greaterThan ( [ shrl:var "v2" ] 0 ) ] ]
);
]
[
rdf:type shrl:Rule;
shrl:head (
[ shrl:subject [ shrl:var "x" ] ; shrl:predicate :oneIsZero ; shrl:object true ]
) ;
shrl:body (
[ shrl:subject [ shrl:var "x" ] ; shrl:predicate :p ; shrl:object [ shrl:var "v1" ] ]
[ shrl:subject [ shrl:var "x" ] ; shrl:predicate :q ; shrl:object [ shrl:var "v2" ] ]
[ shrl:expr [ sparql:function-or (
[ sparql:equals ( [ shrl:var "v1" ] 0 ) ]
[ sparql:equals ( [ shrl:var "v2" ] 0 ) ]
) ]
]
);
]
) .
The grammar is given below.
Mapping the AST to the abstract syntax.
Additional helpers (short-hand abbreviations):
These allow for well-known rule patterns and also specialised implementations in basic engines
TRANSITIVE(uri)SYMMETRIC(uri)INVERSE(uri)Vocabulary: shacl-rules.ttl.
Well-formedness:
Describe how the abstract model maps to triples??. way round - copes with extra triples. Output is the instance of the abtract model that generates the triples - but need to define "maximal".
Process : accumulators, bottom up/ Walk the structure.
All triples not in the syntax are ignored. No other "shrl:" predicates are allowed (??).
This section defines the outcome of evaluating a rule set on given data. It does not prescribe the algorithm as the method of implementation. An implementation can use any algorithm that generates the same outcome.
Inputs: data graph G, called the base graph, and a rule set RS.
Output: an RDF graph GI of inferred triples
The inferred triples do not include triples present in the set of triples of the base graph.
μ : V → T,
where V is the set of all variables and T is the set of all RDF terms.
The domain of μ is denoted by dom(μ),
and it is the subset of V for which μ is defined.
We use the term solution where it is clear that a solution mapping is meant.
Write μ0 for the solution mapping such that
dom(μ0) is the empty set.
subst(μ, triple pattern) that returns a triple pattern
where each occurrence in the triple pattern of a variable that is in the
dom(μ)
is replaced by the RDF term given by the solution mapping for var.
If the triple pattern result has no variables, then it is an RDF Triple.
Let G be an RDF graph and TP be a triple pattern.
The function graphMatch(G, TP) returns a set of all possible
solutions that,
when applied to the triple pattern, produce a triple that is in the
evaluation graph
Let G be an RDF graph and TP be a triple pattern.
graphMatch(G, TP) = { μ | subst(μ, TP) is a triple in G }
Let S1 and S2 be solutions.
compatible(μ1, μ2) = true
if forall v in dom(μ1) intersection dom(μ2)
μ1(v) = μ2(v)
compatible(μ1, μ2) = false otherwise
merge(μ1, μ2) = { μ |
μ(v) = μ1(v) if v in dom(μ1)
μ(v) = μ2(v) otherwise }
merge(S1, S2) = { μ |
μ1 in S1, μ2 in S2
and compatible(μ1, μ2)
μ(v) = merge(μ1, μ2)
Say the domain is dom(S1) ∪︀ dom(S2).
Say that two solutions that have no variables in common are compatible.
Sketch
Let F(arg1, arg2, ...) be an expression.
where arg1, arg2 are RDF terms.
@@
Let [x/μ] be
if x is an RDF term, then [x/row] is x
if x is a variable, then [x/row] is μ(x)
## By well-formedness, it is an error if x is not in the row.
eval(F(expr1, expr2 ...), row) = F(eval(expr1, row), eval(expr2, row), ...)
...
eval(FF(expr1, expr2) , row) = ... things that are not functions like `IF`
Sketch
Turn into definitions of the step components
let R be a well-formed rule.
let rule R = (H, B) where
H is the sequence of triple templates in the head
B is the sequence of triple patterns, condition expressions,
and assignments in the body
let R : map variable to RDF term as a set of pairs (variable, RDF term)
## Solution sequence of one solution that does not map any variables.
## (This is the join identity)
let SEQ: Solution sequence = { μ0 }
let G = evaluation graph
# Start::
Replace each blank node in B with a fresh
variable that does not occur in the rule body.
# Evaluate rule body
for each rule element rElt in B
if rElt is a triple pattern TP:
X = graphMatch(G, TP)
SEQ1 = {}
for each μ1 in X:
for each μ2 in SEQ:
if compatible(μ1, μ2)
μ3 = merge(μ1, μ2)
add μ3 to SEQ1
endfor
endif
if rElt is a condition expression F:
SEQ1 = {}
for each solution μ in SEQ:
## EBV = Effective boolean value.
## TODO: Eval errors.
if ( EBV(eval(μ, F)) is true )
add μ to SEQ1
endif
endfor
endif
if rElt is an assignment(V, expr)
SEQ1 = {}
for each solution S in SEQ:
let x = eval(expr, S)
add(V, x) to S
add S to SEQ1
endfor
endif
if SEQ1 is empty
SEQ = {}
exit
endif
SEQ = SEQ1
endfor
# Evaluate rule head
let H = empty set
for each μ in SEQ:
let S = {}
for each triple template TT in head
let triple = subst(μ, TT)
Add triple to S
H = H union S
endfor
result eval(R, G) is H
Note that H may contain triples that are also in the data graph.
Sketch
let G0 be the input RDF graph.
let RS be the rule set
Apply stratification to RS
let L be the sequence of layers after stratification
let GI = G0
for each layer in L:
let finished = false
while !finished:
finished = true
for each rule in layer:
let X = eval(rule, GI)
let Y = { t ∈ X | t ∉ in GI }
if Y is not empty:
finished = false
endif
let GI = Y ∪︀ GI
endfor
endwhile
endfor
the result is GI
[1] |
RuleSet |
::= | ( Prologue ( Rule | Data ) )* |
[2] |
Prologue |
::= | ( BaseDecl | PrefixDecl | VersionDecl | ImportsDecl )* |
[3] |
BaseDecl |
::= | 'BASE' IRIREF |
[4] |
PrefixDecl |
::= | 'PREFIX' PNAME_NS IRIREF |
[5] |
VersionDecl |
::= | 'VERSION' VersionSpecifier |
[6] |
VersionSpecifier |
::= | STRING_LITERAL1 | STRING_LITERAL2 |
[7] |
ImportsDecl |
::= | 'IMPORTS' iri |
[8] |
Rule |
::= | Rule1 | Rule2 | Rule3 | Declaration |
[9] |
Rule1 |
::= | 'RULE' HeadTemplate 'WHERE' BodyPattern |
[10] |
Rule2 |
::= | 'IF' BodyPattern 'THEN' HeadTemplate |
[11] |
Rule3 |
::= | HeadTemplate ':-' BodyPattern |
[12] |
Declaration |
::= | ( 'TRANSITIVE' '(' iri ')' | 'SYMMETRIC' '(' iri ')' | 'INVERSE' '(' iri ',' iri ')' ) |
[13] |
Data |
::= | 'DATA' TriplesTemplateBlock |
[14] |
HeadTemplate |
::= | TriplesTemplateBlock |
[15] |
BodyPattern |
::= | '{' BodyPattern1 '}' |
[16] |
BodyPattern1 |
::= | BodyTriplesBlock? ( BodyNotTriples BodyTriplesBlock? )* |
[17] |
BodyNotTriples |
::= | Filter | Negation | Assignment |
[18] |
BodyTriplesBlock |
::= | TriplesBlock |
[19] |
Negation |
::= | 'NOT' '{' BodyBasic '}' |
[20] |
BodyBasic |
::= | BodyTriplesBlock? ( Filter BodyTriplesBlock? )* |
[21] |
TriplesTemplateBlock |
::= | '{' TriplesTemplate? '}' |
[22] |
TriplesTemplate |
::= | TriplesSameSubject ( '.' TriplesTemplate? )? |
[23] |
TriplesBlock |
::= | TriplesSameSubjectPath ( '.' TriplesBlock? )? |
[24] |
ReifiedTripleBlock |
::= | ReifiedTriple PropertyList |
[25] |
ReifiedTripleBlockPath |
::= | ReifiedTriple PropertyListPath |
[26] |
Assignment |
::= | 'BIND' '(' Expression 'AS' Var ')' |
[27] |
Reifier |
::= | '~' VarOrReifierId? |
[28] |
VarOrReifierId |
::= | Var | iri | BlankNode |
[29] |
Filter |
::= | 'FILTER' Constraint |
[30] |
Constraint |
::= | BrackettedExpression | BuiltInCall | FunctionCall |
[31] |
FunctionCall |
::= | iri ArgList |
[32] |
ArgList |
::= | NIL | '(' Expression ( ',' Expression )* ')' |
[33] |
ExpressionList |
::= | NIL | '(' Expression ( ',' Expression )* ')' |
[34] |
TriplesSameSubject |
::= | VarOrTerm PropertyListNotEmpty | TriplesNode PropertyList | ReifiedTripleBlock |
[35] |
PropertyList |
::= | PropertyListNotEmpty? |
[36] |
PropertyListNotEmpty |
::= | Verb ObjectList ( ';' ( Verb ObjectList )? )* |
[37] |
Verb |
::= | VarOrIri | 'a' |
[38] |
ObjectList |
::= | Object ( ',' Object )* |
[39] |
Object |
::= | GraphNode Annotation |
[40] |
TriplesSameSubjectPath |
::= | VarOrTerm PropertyListPathNotEmpty | TriplesNodePath PropertyListPath | ReifiedTripleBlockPath |
[41] |
PropertyListPath |
::= | PropertyListPathNotEmpty? |
[42] |
PropertyListPathNotEmpty |
::= | ( VerbPath | VerbSimple ) ObjectListPath ( ';' ( ( VerbPath | VerbSimple ) ObjectListPath )? )* |
[43] |
VerbPath |
::= | Path |
[44] |
VerbSimple |
::= | Var |
[45] |
ObjectListPath |
::= | ObjectPath ( ',' ObjectPath )* |
[46] |
ObjectPath |
::= | GraphNodePath AnnotationPath |
[47] |
Path |
::= | PathSequence |
[48] |
PathSequence |
::= | PathEltOrInverse ( '/' PathEltOrInverse )* |
[49] |
PathEltOrInverse |
::= | PathElt | '^' PathElt |
[50] |
PathElt |
::= | PathPrimary |
[51] |
PathPrimary |
::= | iri | 'a' | '(' Path ')' |
[52] |
TriplesNode |
::= | Collection | BlankNodePropertyList |
[53] |
BlankNodePropertyList |
::= | '[' PropertyListNotEmpty ']' |
[54] |
TriplesNodePath |
::= | CollectionPath | BlankNodePropertyListPath |
[55] |
BlankNodePropertyListPath |
::= | '[' PropertyListPathNotEmpty ']' |
[56] |
Collection |
::= | '(' GraphNode+ ')' |
[57] |
CollectionPath |
::= | '(' GraphNodePath+ ')' |
[58] |
AnnotationPath |
::= | ( Reifier | AnnotationBlockPath )* |
[59] |
AnnotationBlockPath |
::= | '{|' PropertyListPathNotEmpty '|}' |
[60] |
Annotation |
::= | ( Reifier | AnnotationBlock )* |
[61] |
AnnotationBlock |
::= | '{|' PropertyListNotEmpty '|}' |
[62] |
GraphNode |
::= | VarOrTerm | TriplesNode | ReifiedTriple |
[63] |
GraphNodePath |
::= | VarOrTerm | TriplesNodePath | ReifiedTriple |
[64] |
VarOrTerm |
::= | Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL | TripleTerm |
[65] |
ReifiedTriple |
::= | '<<' ReifiedTripleSubject Verb ReifiedTripleObject Reifier? '>>' |
[66] |
ReifiedTripleSubject |
::= | Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | ReifiedTriple |
[67] |
ReifiedTripleObject |
::= | Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | ReifiedTriple | TripleTerm |
[68] |
TripleTerm |
::= | '<<(' TripleTermSubject Verb TripleTermObject ')>>' |
[69] |
TripleTermSubject |
::= | Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode |
[70] |
TripleTermObject |
::= | Var | iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | TripleTerm |
[71] |
TripleTermData |
::= | '<<(' TripleTermDataSubject ( iri | 'a' ) TripleTermDataObject ')>>' |
[72] |
TripleTermDataSubject |
::= | iri | RDFLiteral | NumericLiteral | BooleanLiteral |
[73] |
TripleTermDataObject |
::= | iri | RDFLiteral | NumericLiteral | BooleanLiteral | TripleTermData |
[74] |
VarOrIri |
::= | Var | iri |
[75] |
Var |
::= | VAR1 | VAR2 |
[76] |
Expression |
::= | ConditionalOrExpression |
[77] |
ConditionalOrExpression |
::= | ConditionalAndExpression ( '||' ConditionalAndExpression )* |
[78] |
ConditionalAndExpression |
::= | ValueLogical ( '&&' ValueLogical )* |
[79] |
ValueLogical |
::= | RelationalExpression |
[80] |
RelationalExpression |
::= | NumericExpression ( '=' NumericExpression | '!=' NumericExpression | '<' NumericExpression | '>' NumericExpression | '<=' NumericExpression | '>=' NumericExpression | 'IN' ExpressionList | 'NOT' 'IN' ExpressionList )? |
[81] |
NumericExpression |
::= | AdditiveExpression |
[82] |
AdditiveExpression |
::= | MultiplicativeExpression ( '+' MultiplicativeExpression | '-' MultiplicativeExpression | ( NumericLiteralPositive | NumericLiteralNegative ) ( ( '*' UnaryExpression ) | ( '/' UnaryExpression ) )* )* |
[83] |
MultiplicativeExpression |
::= | UnaryExpression ( '*' UnaryExpression | '/' UnaryExpression )* |
[84] |
UnaryExpression |
::= | '!' PrimaryExpression |
[85] |
PrimaryExpression |
::= | BrackettedExpression | BuiltInCall | iriOrFunction | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm |
[86] |
ExprTripleTerm |
::= | '<<(' ExprTripleTermSubject Verb ExprTripleTermObject ')>>' |
[87] |
ExprTripleTermSubject |
::= | iri | RDFLiteral | NumericLiteral | BooleanLiteral | Var |
[88] |
ExprTripleTermObject |
::= | iri | RDFLiteral | NumericLiteral | BooleanLiteral | Var | ExprTripleTerm |
[89] |
BrackettedExpression |
::= | '(' Expression ')' |
[90] |
BuiltInCall |
::= | 'STR' '(' Expression ')' |
[91] |
iriOrFunction |
::= | iri ArgList? |
[92] |
RDFLiteral |
::= | String ( LANG_DIR | '^^' iri )? |
[93] |
NumericLiteral |
::= | NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative |
[94] |
NumericLiteralUnsigned |
::= | INTEGER | DECIMAL | DOUBLE |
[95] |
NumericLiteralPositive |
::= | INTEGER_POSITIVE | DECIMAL_POSITIVE | DOUBLE_POSITIVE |
[96] |
NumericLiteralNegative |
::= | INTEGER_NEGATIVE | DECIMAL_NEGATIVE | DOUBLE_NEGATIVE |
[97] |
BooleanLiteral |
::= | 'true' | 'false' |
[98] |
String |
::= | STRING_LITERAL1 | STRING_LITERAL2 | STRING_LITERAL_LONG1 | STRING_LITERAL_LONG2 |
[99] |
iri |
::= | IRIREF | PrefixedName |
[100] |
PrefixedName |
::= | PNAME_LN | PNAME_NS |
[101] |
BlankNode |
::= | BLANK_NODE_LABEL | ANON |
Productions for terminals:
[102] |
IRIREF |
::= | '<' ([^<>"{}|^`\]-[#x00-#x20])* '>' |
[103] |
PNAME_NS |
::= | PN_PREFIX? ':' |
[104] |
PNAME_LN |
::= | PNAME_NS PN_LOCAL |
[105] |
BLANK_NODE_LABEL |
::= | '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)? |
[106] |
VAR1 |
::= | '?' VARNAME |
[107] |
VAR2 |
::= | '$' VARNAME |
[108] |
LANG_DIR |
::= | '@' [a-zA-Z]+ ('-' [a-zA-Z0-9]+)* ('--' [a-zA-Z]+)? |
[109] |
INTEGER |
::= | [0-9]+ |
[110] |
DECIMAL |
::= | [0-9]* '.' [0-9]+ |
[111] |
DOUBLE |
::= | ( ([0-9]+ ('.'[0-9]*)? ) | ( '.' ([0-9])+ ) ) [eE][+-]?[0-9]+ |
[112] |
INTEGER_POSITIVE |
::= | '+' INTEGER |
[113] |
DECIMAL_POSITIVE |
::= | '+' DECIMAL |
[114] |
DOUBLE_POSITIVE |
::= | '+' DOUBLE |
[115] |
INTEGER_NEGATIVE |
::= | '-' INTEGER |
[116] |
DECIMAL_NEGATIVE |
::= | '-' DECIMAL |
[117] |
DOUBLE_NEGATIVE |
::= | '-' DOUBLE |
[118] |
STRING_LITERAL1 |
::= | "'" ( ([^#x27#x5C#xA#xD]) | ECHAR )* "'" |
[119] |
STRING_LITERAL2 |
::= | '"' ( ([^#x22#x5C#xA#xD]) | ECHAR )* '"' |
[120] |
STRING_LITERAL_LONG1 |
::= | "'''" ( ( "'" | "''" )? ( [^'\] | ECHAR ) )* "'''" |
[121] |
STRING_LITERAL_LONG2 |
::= | '"""' ( ( '"' | '""' )? ( [^"\] | ECHAR ) )* '"""' |
[122] |
ECHAR |
::= | '\' [tbnrf\"'] |
[123] |
NIL |
::= | '(' WS* ')' |
[124] |
WS |
::= | #x20 | #x9 | #xD | #xA |
[125] |
ANON |
::= | '[' WS* ']' |
[126] |
PN_CHARS_BASE |
::= | [A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x02FF] | [#x0370-#x037D] | [#x037F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] |
[127] |
PN_CHARS_U |
::= | PN_CHARS_BASE | '_' |
[128] |
VARNAME |
::= | ( PN_CHARS_U | [0-9] ) ( PN_CHARS_U | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] )* |
[129] |
PN_CHARS |
::= | PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] |
[130] |
PN_PREFIX |
::= | PN_CHARS_BASE ((PN_CHARS|'.')* PN_CHARS)? |
[131] |
PN_LOCAL |
::= | (PN_CHARS_U | ':' | [0-9] | PLX ) ((PN_CHARS | '.' | ':' | PLX)* (PN_CHARS | ':' | PLX) )? |
[132] |
PLX |
::= | PERCENT | PN_LOCAL_ESC |
[133] |
PERCENT |
::= | '%' HEX HEX |
[134] |
HEX |
::= | [0-9] | [A-F] | [a-f] |
[135] |
PN_LOCAL_ESC |
::= | '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' ) |
@@see the Turtle registration for format
The Internet Media Type (formerly known as MIME Type) for @@ is "text/shape-rules".
The information that follows has been submitted to the Internet Engineering Steering Group (IESG) for review, approval, and registration with IANA.
This section is non-normative.
TODO
This section is non-normative.
TODO
This section is non-normative.
TODO
This section is non-normative.
Many people contributed to this document, including members of the RDF Data Shapes Working Group.
There are no issues listed in this specification.
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in: