Re: RDF to HTML templating

On Dec 18, 2013, at 10:46 PM, Austin William Wright <aaa@bzfx.net> wrote:
> 
> I had an idea for an HTML template with RDF something like four years ago. I asked the question of the Semantic Web Interest Group people, but no one seemed to have ever thought of rendering RDF into structured data, which I thought strange, or they directed me to Fresnel, which is strictly presentational, it's not converting anything to consumable data, but just presenting it, not much differently than a CSS stylesheet.
> 
> My idea is more akin to XSLT, I it in an earlier message:
> <http://lists.w3.org/Archives/Public/public-rdfjs/2013Oct/0041.html>
> 
> The idea is that we use RDFa with bnodes/variables to do value substitution into HTML documents, with some additional elements to do things like looping over result sets, control structures, and such.
> 
> The upshot is that you can parse the RDFa document and get back the exact same RDF statements that were used to generate it. That is just so awesome, I think.
> 
> I had an implementation in the form of a modified Jade parser for Node.js. It worked... barely. The source is here:
> <https://github.com/Acubed/magnode/blob/master/lib/transform.JadeRDFa.js>
> (it's been unused for so long it probably doesn't work anymore)

My Ruby RDFa processor generates HTML+RDFa using Haml from any RDF source. In principle, it could use any HTML templating system. It's at http://github.com/ruby-rdf/rdf-rdfa. Running live at http://rdf.greggkellogg.net/distiller.

Gregg

> I'd like to see this formalized, though I'm not sure it would be in our scope to adopt work on such a TR, but we could certainly discuss implementations and informally work on libraries, see what works, and document suggestions.
> 
> Austin.
> 
>> On Wed, Dec 18, 2013 at 9:04 AM, Henry Story <henry.story@bblfish.net> wrote:
>> Hi all,
>> 
>>   I have a quick question:
>> 
>>  Is there a simple RDF to HTML templating library?
>> 
>> We have developed an initial PointedGraph library for
>> rdflib [1],  and would like to have a function such as
>> 
>>    template.apply(pg,template)
>> 
>> which would bind the pointed graph to a template.
>> I imagine this could be best done with an RDFa
>> template, but I don't know what the issues with
>> this are. I am quite open to other suggestions too.
>> 
>> I have seen Vie, but this seems to require a whole
>> framework. It would be nice to have a library dedicated
>> to just this functionality, so that one can use it with
>> different libraries, or develop our own.
>> 
>> All the best,
>> 
>>         Henry Story
>> 
>> 
>> [1] https://github.com/stample/rww-play/blob/withPointedGraph/public/ldp/lib/pointedGraph.js
>>    We'd like to then have an rdfstore implementation for this later.
>> 
>> Social Web Architect
>> http://bblfish.net/
> 

Received on Thursday, 19 December 2013 14:24:05 UTC