Re: Evaluations of Test Cases 46-56

Ben Adida wrote:
> Manu Sporny wrote:
>> TC48: SEMANTICS OK, SPARQL OK
>>       I've stared at this one for quite some time and thoroughly
>>       confused myself. Somebody that is more familiar with the
>>       processing rules will have to explain why this is right or
>>       wrong. It passes the latest pyRDFa and SPARQL implementations.
> 
> Here's how I think about it:
> 
> If you had the following markup:
> 
> <div about="http://www.example.org"
>      rel="foaf:knows">
>   <p property="foaf:name">John Doe</p>
> </div>
> 
> Then by the chaining rule of @rel, you get:
> 
> <http://www.example.org> foaf:knows _:x
> _:x foaf:name "John Doe" .
> 
> where the bnode _:x "corresponds" to the DIV and is the chaining node.
> 
> @instanceof, when added, applies to this corresponding bnode, the
> chaining node, so, when you add
> 
> instanceof="foaf:Person", you get the same triples as above plus:
> 
> _:x rdf:type foaf:Person .

Ah... so you're saying that the SPARQL should be:

ASK WHERE {
	<http://www.example.org> <http://xmlns.com/foaf/0.1/knows> _:a .
	_:a <http://xmlns.com/foaf/0.1/name> "John Doe" .
	_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
            <http://xmlns.com/foaf/0.1/Person> .
}

So, just to clarify:

If @rel is specified and @resource is specified, the @instanceof is
applied to the subject set by @resource (TC47).

If @rel is specified but @resource and @about is not specified, the
@instanceof creates a new bnode and specifies that as the active @about
for the @rel (TC48)?

It seems like we're saying if you do this:

<div about="http://www.example.org" instanceof="foaf:Person">

then you get this:

<http://www.example.org> <rdf:type> foaf:Person

but if you do this:

<div about="http://www.example.org" instanceof="foaf:Person"
     rel="foaf:knows" resource="#foo">

then you get this:

<http://www.example.org> <foaf:knows> <#foo>
<#foo> <rdf:type> foaf:Person

That is confusing to me. It feels like we're changing the meaning of
@about/@instanceof when they are used together based on whether or not
@rel and @resource exist. When we use @about and @instanceof in the same
element, the same thing should always happen... @instanceof should be
applied to @about.

What am I missing? It feels like I'm missing something fundamental.

-- manu

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: Bitmunk Launches World's First Open Music Recommendation Service
http://blog.digitalbazaar.com/2007/09/09/bitmunk-music-recommendation/

Received on Thursday, 18 October 2007 06:50:23 UTC