Skip to content
EntityQ29377880· pop 5· linked from 4 articles

Shape Expressions

Sign in to save

Also known as ShapeExpressions, ShEx, shex, sx

Shape Expressions (ShEx) is a data modelling language for validating and describing a Resource Description Framework (RDF).

Described at

Shape Expressions Language 2.1

The Shape Expressions (ShEx) language describes RDF nodes and graph structures. A node constraint describes an RDF node (IRI, blank node or literal) and a shape describes the triples involving nodes in an RDF graph. These descriptions identify predicates and their associated cardinalities and datatypes. ShEx shapes can be used to communicate data structures associated with some process or interface, generate or validate data, or drive user interfaces.

shex.io

The Shape Expressions (ShEx) language describes RDF nodes and graph structures. A node constraint describes an RDF node (IRI , blank node or literal ) and a shape describes the triples involving nodes in an RDF graph . These descriptions identify predicates and their associated cardinalities and datatypes. ShEx shapes can be used to communicate data structures associated with some process or interface, generate or validate data, or drive user interfaces. This document defines the ShEx language. See the Shape Expressions Primer for a non-normative description of ShEx. This specification was published by the Shape Expressions Community Group . It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups . The Shape Expressions (ShEx) language provides a structural schema for RDF data. This can be used to document APIs or datasets, aid in development of API-conformant messages, minimize defensive programming, guide user interfaces, or anything else that involves a machine-readable description of data organization and typing requirements. ShEx describes RDF graph [RDF11-CONCEPTS ] structures as sets of potentially connected Shapes . These constrain the triples involving nodes in an RDF graph . Node Constraints constrain RDF nodes by constraining their node kind (IRI , blank node or Literal ), enumerating permissible values in value sets, specifying their datatype, and constraining value ranges of Literals. Additionally, they constrain lexical forms of Literals , IRIs and labeled blank nodes . Shape Expressions schemas share blank nodes with the constrained RDF graphs in the same way that graphs in RDF datasets [rdf11-concepts ] share blank nodes. The JSON [rfc7159 Data Interchange Format") ] Syntax serves as a serializable proxy for an abstract syntax. The following examples are excerpts from the definitions below. In the JSON notation, In javascript-enabled browsers, schemas with a json button can be converted between the JSON representation and the compact syntax by clicking the button. The button text indicates the currently shown representation. Selecting the example and pressing "j" or "c" converts the example to the JSON (ShExJ) or compact form (ShExC). Pressing "shift J" or "shift C" converts all such examples to ShExJ or ShExC. ShEx validation is defined in this document by the isValid function. This process takes as input a shapes schema , an RDF graph , and a fixed ShapeMap (abbreviated as "ShapeMap" in this document). ShEx validation results may be reported as a result ShapeMap [shape-map ]. For illustration purposes in this specification, both the fixed ShapeMap input and the result ShapeMap output are represented in a table with four columns: node: a ShapeMap nodeSelector, shape: a ShapeMap shapeLabel, result: "pass" (for "conformant" status) or "fail" ("nonconformant" status), and an optional reason: an informal, human-readable explanation. 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. Conformance criteria are relevant to authors and authoring tool implementers. 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.

Excerpt from a page describing this subject · 40,000 chars · not written by Vinony

Wikidata facts

Official website
shex.io
Show 9 more facts
Stack Exchange tag
stackoverflow.com/tags/shex
media type
text/shex
file extension
shex
Mac OS type code
TEXT
inception
2013-00-00
XML namespace URL
www.w3.org/ns/shex#
described at URL
shex.io/shex-semantics
Sources (2)

via Wikidata · CC0

~2 min read

Article

8 sections
Contents
  • Example
  • Implementations
  • Online playgrounds and demos
  • References
  • Further reading
  • Specification
  • Other
  • See also

Shape Expressions (ShEx) is a data modelling language for validating and describing a Resource Description Framework (RDF).

It was proposed at the 2012 RDF Validation Workshop as a high-level, concise language for RDF validation.

Available in 5 languages

via Wikidata sitelinks · CC0

Connections

Categories