ShEx IconW3C SW

ShEx - Shape Expressions

Validation, traversal and transformation of RDF graphs.

Shape Expressions is a structural schema language for RDF graphs. It allows one to describe profiles of data like this:

# our EmployeeShape reuses the FOAF ontology
<EmployeeShape> {                # An <EmployeeShape> has:
    foaf:givenName  xsd:string+,   # at least one givenName.
    foaf:familyName xsd:string,    # one familyName.
    foaf:phone      IRI*,          # any number of phone numbers.
    foaf:mbox       IRI            # one FOAF mbox.
}
# Employee7 matches EmployeeShape
<http://a.example/Employee7>
    foaf:givenName  "Robert", "Taylor" ;
    foaf:familyName "Johnson" ;
    # no phone number needed
    foaf:mbox       <mailto:rtj@example.com>
    .

Features