Eric Prud'hommeaux edited this page Oct 7, 2015 · 2 revisions
Clone this wiki locally


an implementation of Shape Expressions (ShEx)

ShEx provides structural validation of RDF graphs. See instructions for installing shex.js from npm or github. shex.js follows the ShEx Command Line Interface.


Here is a simple invocation of the validator on a system supporting executable scripts:

shex.js/bin/shex-to-json http://shex.io/examples/Issue.shex

You may also have to explicitly invocation node to execute the same script:

node shex.js/bin/shex-to-json http://shex.io/examples/Issue.shex

Install from NPM

Installing via NPM:

npm install shex.js

will install dependent libraries like N3.js. You can then invoke as described above in Invocation.

Install from github Repo

To install from github repo:

for r in shexTest shex.js ; do
  git clone git@github.com:shexSpec/$r &&
  (cd $r && npm install)

Test it with:

(cd shex.js/test && make test)

If you want to test multiple branches, you can:

for b in master errors ; do
  (cd shexTest && git checkout $b) && 
  (cd shex.js && git checkout $b) && 
  (cd shex.js/test && make test)