-
Notifications
You must be signed in to change notification settings - Fork 5
Edit resources with RDFauthor using RDFa
ZIP or git clone https://github.com/AKSW/RDFauthor.git
Add the rdfauthor.js between the HEAD-TAG of your page.
<script type="text/javascript" src="rdfauthor/src/rdfauthor.js"></script>
After adding the JavaScript file to DOM, you have to set the query endpoint, update endpoint as well as the resource graph. This can be done using RDFa.
<link about="http://resource.graph/" rel="update:queryEndpoint" href="http://url.to/sparqlendpoint" />
<link about="http://resource.graph/" rel="update:updateEndpoint" href="http://url.to/sparqlendpoint" />
The namespace update
is a RDF vocabulary for describing data sources. The default namespace is http://ns.aksw.org/update/
.
-
update:sourceGraph
- Specifies the SPARQL / Update endpoint to sent the changes. -
update:queryEndpoint
- Specifies an optional SPARQL endpoint for further queries. -
update:sourceGraph
- Specifies a named graph, the triples has contributed to the current page. -
update:defaultGraph
- Specifies the named graph into which new Statements should be saved.
RDFauthor offers a callback, which is executed before initialization of RDFauthor.
RDFAUTHOR_READY_CALLBACK = function() { RDFauthor.start(); }
This code sample demonstrates RDFauthor embedded in a XHTML website using RDFa.