Re: rdf-spaces

On May 9, 2012, at 10:48, Andy Seaborne wrote:
> 
> On 09/05/12 15:33, David Wood wrote:
>> On May 9, 2012, at 10:26, Andy Seaborne wrote:
>> 
>>> On 09/05/12 15:23, David Wood wrote:
>>>> On May 9, 2012, at 09:35, Sandro Hawke wrote:
>>>> 
>>>>> Following the general outcry against the term "layers", and Guus'
>>>>> endorsement of "spaces", I've renamed it for now.  So the ED is now
>>>>> here:
>>>>> 
>>>>>        http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-spaces/index.html#
>>>>> 
>>>>> It's not yet clear to me what to discuss, on this topic, if we get there
>>>>> in today's agenda.   One thing does seem a little pressing, because it
>>>>> relates to Turtle:
>>>>> 
>>>>> I think it would be great if one could use Turtle in HTML as a dataset
>>>>> language not just a graph language.   The easy way to do this would be
>>>>> to say *if* there's an "id" attribute on any of the script elements
>>>>> containing turtle, the triples parsed from that element go into a named
>>>>> graph and the rest goes into the default graph (along with any RDFa and
>>>>> microdata).
>>>> 
>>>> In spite of others' objections, I'll express some support for this idea in general (but understand that the details would need to change).  My company currently needs to jump through some hoops by converting RDF into JSON either on the server side or client side in order to perform simple operations on RDF results.  I would *love* to be able to embed Turtle as a dataset to avoid unnecessary coding.
>>>> 
>>>> Of course, my needs could be met by other means and by other WGs, but the motivation is sound.
>>>> 
>>> 
>>> Why not use TriG?
>> 
>> I have no objection to using TriG, as long as I can use some contiguous RDF serialization in HTML.  That rules out RDFa.
>> 
> 
> Could you explain that - the Turtle doc already has:
> 
> http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/index.html#in-html
> 
> which is contiguous RDF serialization in HTML.
> 
> It's the named graphs part that I'm missing. (JSON does not seem to help so I guess I didn't understand your initial remark properly.)

Sure.  The Turtle-in-HTML section provides a way to represent triples in HTML.  But where did those triples come from?  How can I refer back to the graph?

For example, I may wish to display those triples on a Web page and provide a link to the graph for provenance.  Alternatively (my more common use case), I may wish to present the triples in an HTML form and cause a graph update upon submission of the form.  In that case, I must know the graph identifier in order to perform the update.

We currently do that with RDFa and a server-side template engine, but we can't use that mechanism in all cases, e.g. when the requested resource wishes to use RDF that can't be directly navigated from the resource - a data island.  So, we end up defining "named" queries (SPARQL queries that have URLs and, when poked, emit JSON via a transform).  It would be great to short-circuit that rather inefficient process (and common use case, at least for us) by allowing relevant datasets to be immediately accessible in the HTML for processing via Javascript.

Regards,
Dave


> 
> 	Andy
> 
>> Regards,
>> Dave
>> 
>> 
>>> 
>>> 	Andy
>>> 
>>>> Regards,
>>>> Dave
>>>> 
>>>> 
>>>>> 
>>>>> It would also be nice to have a way to say one wants the triples to
>>>>> *also* go into the default graph -- so if what you're doing is graph
>>>>> annotation you don't have to repeat all the triples in the annotated
>>>>> graph.  Maybe class="included" or something; I'm not sure how the
>>>>> namespaces of HTML classes works these days.
>>>>> 
>>>>> I know this touches on something Steve said yesterday about getting
>>>>> quads when you're expecting triples; I'll reply to that separately.
>>>>> 
>>>>>     -- Sandro
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
> 

Received on Wednesday, 9 May 2012 15:00:05 UTC