Zum Inhalt springen

Shape Expressions (ShEx)

aus AufEinWort, der freien Forschung
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 21. Oktober 2025 um 06:18 Uhr durch Nikolaos (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „{{Short description|Language for validating, describing or transforming RDF graphs}} {{For|the UK government body|Shareholder Executive}} {{Infobox programming language | name = ShEx - Shape Expressions | logo = File:ShexLogo.png | paradigm = Data Validation | year_started = 2013 | designer = Eric Prud'hommeaux, Iovka Boneva, Jose Emilio Labra Gayo, Gregg Kellogg, [https://www.w3.org/community/shex/ Sha…“). Sie kann sich erheblich von der aktuellen Version unterscheiden.
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Vorlage:Short description Vorlage:For Vorlage:Infobox programming language

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

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

The shapes can be defined in a human-friendly compact syntax called ShExC or using any RDF serialization formats like JSON-LD or Turtle.

ShEx expressions can be used both to describe RDF and to automatically check the conformance of RDF data. The syntax of ShEx is similar to Turtle and SPARQL while the semantics is inspired by regular expression languages like RelaxNG.

Example

PREFIX :       <http://example.org/>
PREFIX schema: <http://schema.org/>
PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>

:Person {
 schema:name  xsd:string   ;
 schema:knows @:Person   * ;
}

The previous example declares that nodes conforming to shape Person must have one property schema:name with a string value and zero or more properties schema:knows whose values must conform with shape Person.

Implementations

Vorlage:sort-under

Project Programming language Version Latest release Compatible ShEx version Features
value checking cardinality manifest shapemap imports external shapes annotations semantic actions
ShEx.ex Elixir v0.1.4 2020-10-13 Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Nein Nein Nein Nein
Ruby ShEx Ruby 0.7.1 2022-01-29 2.0 Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Ja
shexjava Java Vorlage:CNone Vorlage:CNone 2.0 Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno
PyShEx Python v0.8.1 2022-04-14 2.0 Ja Ja Nein Nein Vorlage:dunno Vorlage:dunno Vorlage:dunno
entityshape Python 0.0.2 2023-06-24 Vorlage:dunno Ja Ja Nein Nein Nein Nein Nein
shaclex Scala 0.1.70 2020-11-02 Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno
shex.js JavaScript v1.0.0-alpha.26 2023-04-25 Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Vorlage:dunno Ja Vorlage:dunno

Online playgrounds and demos

References

Vorlage:reflist

Further reading

Specification

  • Shape Expressions Language Specification. W3C Draft Community Group Report, 2018 (github.io).
  • Validating RDF Data. Morgan & Claypool, 2018 (validatingrdf.com).

Other

See also

Vorlage:Semantic Web

  1. ↑ Shape Expressions Language 2.0. 27. März 2017;.
  2. ↑ RDF Validation Workshop: Practical Assurances for Quality RDF Data.