shex#
type: Ontology
title: Shape Expression Vocabulary
description: This document describes the RDFS vocabulary description used in the Shape Expression Language (ShEx) shex-semantics along with the default JSON-LD Context and shape expression to validate RDF versions of shapes.
date: 2017-07-07

Annotation
type: Class
comment: Annotations provide a format-independent way to provide additional information about elements in a schema.

Each Of
type: Class
comment: A TripleExpression composed of one or more sub-expressions, all of which must match.
subclass of: Triple Expression

IRI Stem
type: Class
comment: An IRI prefix used for matching IRIs.
subclass of: Stem

IRI StemRange
type: Class
comment: An IRI prefix (or wildcard) along with a set of excluded values, used for node matching.
subclass of: StemRange

Language
type: Class
comment: An Language tag used for matching Literal Languages.

Language Stem
type: Class
comment: An Language prefix used for matching Literal Languages.
subclass of: Stem

Language StemRange
type: Class
comment: An Language prefix (or wildcard) along with a set of excluded values, used for node matching.
subclass of: StemRange

Literal Stem
type: Class
comment: An Literal prefix used for matching Literals.
subclass of: Stem

Literal StemRange
type: Class
comment: An Literal prefix (or wildcard) along with a set of excluded values, used for node matching.
subclass of: StemRange

Node Constraint
type: Class
comment: A constraint on the type or value of an RDF Node.
subclass of: Shape Expression

Node Kind
type: Class
comment: The set of kinds of RDF Nodes.

One Of
type: Class
comment: A TripleExpression composed of one or more sub-expressions, one of which must match.
subclass of: Triple Expression

Schema
type: Class
comment: A Schema contains the set of shapes, used for matching a focus node.

Semantic Actions
type: Class
comment: A list of Semantic Actions that serve as an extension point for Shape Expressions. They appear in lists in Schema's startActs and Shape, OneOf, EachOf and TripleConstraint's semActs.

Shape Or
type: Class
comment: A shapes schema is captured in a Schema object where shapes is a mapping from shape label to shape expression.
subclass of: Shape Expression

Shape And
type: Class
comment: A ShapeExpression composed of one or more sub-expressions, all of which must match.
subclass of: Shape Expression

Shape Expression
type: Class
comment: The abstract class of Shape Expressions.

Shape External
type: Class
comment: A reference to a shape defined in some external Schema.
subclass of: Shape Expression

Shape Not
type: Class
comment: A ShapeNot is satisfied when it’s included ShapeExpression is not satisfied.
subclass of: Shape Expression

Shape Or
type: Class
comment: A ShapeExpression composed of one or more sub-expressions, one of which must match.
subclass of: Shape Expression

Stem
type: Class
comment: Abstract class for Stems

StemRange
type: Class
comment: Abstract Class for Stem Ranges

Triple Constraint
type: Class
comment: A constraint on a triple having a specific predicate and optionally a shape expression used for matching values.
subclass of: Triple Expression

Triple Expression
type: Class
comment: The abstract class of Triple Expressions.

Wildcard
type: Class
comment: Indicates that a stem is a Wildcard, rather than a URI prefix.

annotation
type: Property
comment: Annotations on a TripleExpression.
domain:
  union of: Each Of
  union of: One Of
  union of: Triple Constraint
range: Annotation

closed
type: Property
comment: Indicates that a Shape is closed, meaning that it may contain no property values other than those used within TripleConstraints.
domain: Shape Or
range: boolean

code
type: Property
comment: Code executed by Semantic Action.
domain: Semantic Actions
range: string

datatype
type: Property
comment: A datatype constraint.
domain: Node Constraint
range: Datatype

exclusion
type: Property
comment: Values that are excluded from value matching.
domain: StemRange
range:
  union of: Resource
  union of: Stem

expression
type: Property
comment: Expression associated with the TripleExpression.
domain: Shape Or
range: Triple Expression

expressions
type: Property
comment: List of 2 or more expressions associated with the TripleExpression.
domain:
  union of: Each Of
  union of: One Of
range: Triple Expression

extra
type: Property
comment: Properties which may have extra values beyond those matched through a constraint.
domain: Shape Or
range: Resource

flags
type: Property
comment: Regular expression flags
domain: Node Constraint
range: string

fraction digits
type: Property
comment: for "fractiondigits" constraints, v is less than or equals the number of digits to the right of the decimal place in the XML Schema canonical form[xmlschema-2] of the value of n, ignoring trailing zeros.
sub property of: numericFacet
domain: Node Constraint
range: integer

inverse
type: Property
comment: Constrains the subject of a triple, rather than the object.
domain: Triple Constraint
range: boolean

language tag
type: Property
comment: The value used to match the language tag of a language-tagged string.
domain: Language
range: string

length
type: Property
comment: The exact length of the value of the cell.
sub property of: stringFacet
domain: Node Constraint
range: integer

maximum cardinality
type: Property
comment: Maximum number of times this TripleExpression may match; -1 for “*”
domain:
  union of: Each Of
  union of: One Of
  union of: Triple Constraint
range: integer

max exclusive
type: Property
comment: An atomic property that contains a single number that is the maximum valid value (exclusive).
sub property of: numericFacet
domain: Node Constraint
range:
  union of: integer
  union of: decimal
  union of: double

max inclusive
type: Property
comment: An atomic property that contains a single number that is the maximum valid value (inclusive).
sub property of: numericFacet
domain: Node Constraint
range:
  union of: integer
  union of: decimal
  union of: double

max length
type: Property
comment: A numeric atomic property that contains a single integer that is the maximum length of the value.
sub property of: stringFacet
domain: Node Constraint
range: integer

minimum cardinatliy
type: Property
comment: Minimum number of times this TripleExpression may match.
domain:
  union of: Each Of
  union of: One Of
  union of: Triple Constraint
range: integer

min exclusive
type: Property
comment: An atomic property that contains a single number that is the minimum valid value (exclusive).
sub property of: numericFacet
domain: Node Constraint
range:
  union of: integer
  union of: decimal
  union of: double

min inclusive
type: Property
comment: An atomic property that contains a single number that is the minimum valid value (inclusive).
sub property of: numericFacet
domain: Node Constraint
range:
  union of: integer
  union of: decimal
  union of: double

min length
type: Property
comment: An atomic property that contains a single integer that is the minimum length of the value.
sub property of: stringFacet
domain: Node Constraint
range: integer

name
type: Property
comment: Identifier of SemAct extension.
domain: Semantic Actions
range: Resource

node kind
type: Property
comment: Restiction on the kind of node matched; restricted to the defined instances of NodeKind. One of shex:iri, shex:bnode, shex:literal, or shex:nonliteral.
domain: Node Constraint
range: Node Kind

numericFacet
type: Property
comment: Abstract property of numeric facets on a NodeConstraint.
sub property of: xsFacet

object
type: Property
comment: The object of an Annotation.
domain: Annotation
range: Resource

pattern
type: Property
comment: A regular expression used for matching a value.
sub property of: stringFacet
domain: Node Constraint
range: string

predicate
type: Property
comment: The predicate of a TripleConstraint or Annotation.
domain:
  union of: Annotation
  union of: Triple Constraint
range: Resource

semantic action
type: Property
comment: Semantic Actions on this TripleExpression.
domain:
  union of: Each Of
  union of: One Of
  union of: Triple Constraint
range: Semantic Actions

shape expression
type: Property
comment: Shape Expression referenced by this shape.
domain: Shape Not
range: Shape Expression

shape expressions
type: Property
comment: A list of 2 or more Shape Expressions referenced by this shape.
sub property of: shape expression
domain:
  union of: Shape And
  union of: Shape Or
range: Shape Expression

shapes
type: Property
comment: Shapes in this Schema.
domain: Schema
range: Shape Expression

start
type: Property
comment: A ShapeExpression matched against the focus node prior to any other mapped expressions.
domain: Schema
range: Shape Expression

start actions
type: Property
comment: Semantic Actions run on the Schema.
domain: Schema
range: Semantic Actions

stem
type: Property
comment: A stem value used for matching or excluding values.
domain:
  union of: Stem
  union of: StemRange
range:
  union of: string
  union of: Wildcard

stringFacet
type: Property
comment: An abstract property of string facets on a NodeConstraint.
sub property of: xsFacet

total digits
type: Property
comment: for "totaldigits" constraints, v equals the number of digits in the XML Schema canonical form[xmlschema-2] of the value of n
sub property of: numericFacet
domain: Node Constraint
range: integer

value expression
type: Property
comment: A ShapeExpression used for matching the object (or subject if inverted) of a TripleConstraint.
domain: Triple Constraint
range: Shape Expression

values
type: Property
comment: A value restriction on a NodeConstraint.
domain: Node Constraint
range:
  union of: Resource
  union of: Language
  union of: Stem
  union of: StemRange

xsFacet
type: Property
comment: An abstract property of string and numeric facets on a NodeConstraint.
domain: Node Constraint

bnode
type: Node Kind
comment: Requires node to be a Blank Node

iri
type: Node Kind
comment: Requires node to be an IRI

literal
type: Node Kind
comment: Requires node to be an rdf:Literal

nonliteral
type: Node Kind
comment: Requires node to be a Blank Node or IRI