@shexjs/extension-map
v1.0.0-alpha.33
Published
Shape Expressions schema-to-schema mapping extension.
Readme
@shexjs/extension-map
ShExMap: a semantic-action extension that binds values as a node validates
(%Map:{ :name %} on a triple constraint captures what the triple's object
was) and materializes a graph of another schema from those bindings. The
extension registers as http://shex.io/extensions/Map/#.
npm install @shexjs/extension-mapshexmap-materialize -t target.shex [-j vars.json] [-r root]reads the bindingsshex-validate --extension @shexjs/extension-mapprinted and builds the target graph (doc/threaded-materializer.mdsays how: a threaded search over the target schema, alternatives offered where the bindings could fit more than one way).shexmap-debugsteps that materialization from a terminal.- In the web app,
shex-simple.html?plugin=…/doc/ShExMapPlugin.js(orshexmap-simple.html) adds the bindings, output-schema and materialization panes; the plugin is built fromsrc/plugin/ShExMapPlugin.tsbynpm run build, which also compiles the library intolib/.
The library (require("@shexjs/extension-map")) is a factory taking the
ShEx modules it works with and answering the extension -- register(validator, {ShExTerm}),
the ThreadedMaterializer and its debugger; see the repository for the
ShExMap specification and examples/ for worked pairs.
@shexjs/extension-map is one of the shex.js packages; installing shex pulls in the whole suite, and its README maps them.
