ShEx logo

ShEx.js WebApps

In-browser demos of the shex.js implementation of Shape Expressions. One validator, in two flavors: simple runs validation on the UI thread; worker runs it in a Web Worker so the page stays responsive (and validation can be interrupted). Everything else is a plugin the validator loads by URL (?plugin=<url>, or named by a manifest entry): a module that may install semantic-action extensions for schemas to dispatch, and may add a screen of panes and verbs of its own beside the validator's.

ShEx validator

Validate RDF data against a ShEx schema (ShExC, ShExJ or ShExR).

ShExMap plugin

Validate with the Map extension, capture bindings, and materialize them into another RDF graph on a screen of its own. These URLs open the validator with the plugin and its examples loaded.

ShExReduce plugin

Validate with the Reduce extension — actions that steer or check a match as it happens — then fold the parse into an AST. The demo manifest's calculator entries show both.

Semantic-action extensions

Each link opens the validator on one extension's demo manifest; every entry names the plugin it needs, so picking it installs the handler. Pass and fail examples each, appinfo shows what an action recorded.

SHACL-SPARQL

Your sh:sparql queries as ShEx semantic actions: a SELECT fails on each row, an ASK passes when true, $this and $value pre-bound — with ShEx's recursion, CLOSED shapes, and queries that steer which triple matches which constraint. Queries run over the data in the page, through Comunica (~3 MB).

Write your own

A plugin is one URL: a module that registers what it adds. doc/plugins.md is the contract, and hello-plugin.js is a working one in about forty lines.

Experiments

Long-running strawmen, each on a branch of its own, published beside this site. The table (and the publication itself) comes from a data block in this page's source.