Re: named graphs in HTML

On May 9, 2012, at 16:34 , Sandro Hawke wrote:
> 
> Option 1:
> 
> At http://example.com/doc1 we say: 
> 
>        <html>
>        ...
>        <script type="text/trig">
>        @prefix eg: <http://example.com/ns>.
>        <#section> { eg:a eg:b eg:c }
>        </script>
>        ...
>        </html>
> 
> Option 2:
> 
> 
> At http://example.com/doc1 we say: 
> 
>        <html>
>        ...
>        <script type="text/turtle" id="section">
>        @prefix eg: <http://example.com/ns>.
>        eg:a eg:b eg:c.
>        </script>
>        ...
>        </html>
> 
> Okay, yeah, I see your point.   Mechanically, option 1 is okay, and
> procedurally, it's much simpler.
> 
> My preference for option 2 comes from my sense of Web Architecture, that
> id attributes simply continue the URL after the hash.   The URL foo#bar,
> if "foo" is an HTML document", is the *name* of the section of "foo"
> with the id "bar".   

I agree. It would be better... and we had similar discussions in the RDFa group, ie, whether the @id attribute would be used or not. However, practice went against us: HTML authors, who do not really know too much about these issues, would be bound to make a mistake and get unwanted consequences (so RDFa, for that reason, does _not_ use @id either).

Ivan


> But whatever.  This wouldn't be the first time
> people chose expediency of architectural purity.
> 
>     -- Sandro
> 
> 
>> Ivan
>> 
>> 
>>> 
>>> 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
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> ----
>> Ivan Herman, W3C Semantic Web Activity Lead
>> Home: http://www.w3.org/People/Ivan/
>> mobile: +31-641044153
>> FOAF: http://www.ivan-herman.net/foaf.rdf
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Wednesday, 9 May 2012 15:01:32 UTC