Representing X in RDF
The JavaScript-based extension mechanism for SHACL (SHACL-JS) defines some RDF terms that can be used to represent JavaScript code and libraries as part of the shapes graph. SHACL-X extends that syntax by adding new terms for the new supported languages.
The extended vocabulary includes the classes sh:
XExecutable
, where X = JS | Py (e.g. sh:PyExecutable
). SHACL instances of this class are called X executables.
FunctionName
Every X executable must have exactly one value for the property sh:
xFunctionName
. The value is a literal
with datatype xsd:string
.
x Library
Every X executable must have at least one value for the property sh:
xLibrary
. The values of the property are IRIs or blank nodes. In both cases, they must be a well formed SHACL instance of the class sh:
XLibrary
.
X Library
The class sh:
XLibrary
is used to declare X libraries. An X library is a pointer to zero or more X files that are executed before the evaluation of an X executable. Libraries depdenency is allowed, by declaring further sh:
xLibrary
triples. The values of the property sh:
xLibraryURL
are literals with datatype xsd:anyURI
.