Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

STTL

The SPARQL Template Transformation Language (STTL) is a specification to turn RDF graphs into character strings, e.g. for HTML rendering or syntax convertion.

Quickstart

const sttl = require('sttl');

// configuration
sttl.connect('a SPARQL endpoint URL');
sttl.register(
  'template { ?in " " ?p " " ?o " ." }' +
  'where { ?in ?p ?o . filter (isURI(?in) && isURI(?o)) }'
);

// Promise-based API
sttl.applyTemplates().then(ntriples => console.log(ntriples));

Instead of a remote SPARQL endpoint, a callback function returning results as SPARQL JSON can be given as argument of sttl.connect(). See /examples for a CLI and example templates.

Build

$ npm install
$ npm run-script build
$ npm test

To use in the browser:

$ npm run-script build-browser

About

JavaScript implementation of the SPARQL Template Transformation Language (STTL)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published