- From: Brandon Schwartz <brandon@boomajoom.com>
- Date: Tue, 27 Jan 2015 11:59:24 -0800
- To: Graham Klyne <gk@ninebynine.org>
- Cc: semantic-web <semantic-web@w3.org>
- Message-ID: <CADAUcstxJ98vZsQ_eT5HV+FJUxsBP=JhLCPBefpkWYJUeVNcWw@mail.gmail.com>
Forgive my perhaps naive answer, but I've been tackling something similar. I think this might be solved by existing tools. Take Pyramid for instance ( http://www.pylonsproject.org/). You can create a view that assigns variables to values and passes them as a context to the result. Pyramid allows you to tie different renderers to the same view. For instance, you can do example.com/john.json or example.com/john.html and pass the same outputs to different formats. I would imagine you can create templates for RDF statements based on the same construct. Again, I'm not sure that meets the needs but this is how I've assumed it would be done. -- My home page: http://www.boomajoom.com Languages & Linguistics: http://www.languapedia.com On Tue, Jan 27, 2015 at 1:44 AM, Graham Klyne <gk@ninebynine.org> wrote: > I just scanned this thread, and am mildly surprised at no mention of > SPARQL CONSTRUCT constructs. Some SPARQL engines (e.g. Python rdflib) > allow pre-defined variable bindings to be used, so a trivial query coupled > with a CONSTRUCT clause might do the trick. > > If you want a command line solution, there's ASQC ( > https://github.com/gklyne/asqc). This can accept a variable binding in > SPARQL JSON format and be combined with a trivial query against some > trivial data with a CONSTRUCT clause. It's a little bit messy for your > requirement, but it might be a quick fix option for a one-off. > > (ASQC uses Python rdflib - the relevant code for using predefined bindings > is at https://github.com/gklyne/asqc/blob/master/src/asqc/asqc.py#L355) > > #g > -- > > > On 10/05/2014 13:54, Stéphane Campinas wrote: > >> Hi, >> >> Do you know of any tool that creates RDF statements based on some >> template ? >> >> For example, let's imagine I have the following template: >> >> <http://acme.org/${id}> <http://acme.org/predicate1> "${something}" . >> <http://acme.org/${id}> <http://acme.org/predicate2> >> <http://acme.org/${person}> . >> >> >> where /*${...}*/ are variables. Then, by providing values for these >> variables, >> the following statements would be created: >> >> ${id} = e1 ${something} = blabla ${person} = john >> >> <http://acme.org/e1> <http://acme.org/predicate1> "blabla" . >> <http://acme.org/e1> <http://acme.org/predicate2> >> <http://acme.org/john> . >> >> Have you seen any such tool ? >> >> Thanks >> >> >
Received on Tuesday, 27 January 2015 20:00:12 UTC