Print

Print


Thomas and ASoroka -

Go back to the thread begun on 7/14,[1]  and also read the articles quoted:

[1] 
http://answers.semanticweb.com/questions/1673/skolem-syntax-for-blank-nodes-in-sparql 

[2] 
http://stackoverflow.com/questions/20629437/sparql-query-with-blank-node-can-be-complex 


If you are starting with RDF/XML or turtle, you have to determine what 
triples your software is deriving from them. See the reply by Kevin and 
the subsequent replies of mine. If your software is "skolemizing" the 
blank nodes, which means turning them into named nodes, then your query 
"works" -- but different software works differently. You can test this 
using the test I did in my third post:

      PREFIX bf:   <http://bibframe.org/vocab/>
      SELECT ?s ?p ?o
      WHERE {
          ?s bf:providerName ?o .
      }

If you don't see bnodes then the software has skolemized them.

When I turned the RDF/XML into triples which do not have skolemized 
nodes, the search does not work in that same software, which I believe 
is for the reasons given in the articles above. I made the files 
available so others can try the same search.

http://bibframe.org/resources/Ahx1405278232/bibframe.rdf  [original BF file]
http://kcoyle.net/temp/bibframeTomS.ttl
http://kcoyle.net/temp/bibframeTomS.n3

The latter two were derived from the former using rapper.

Thomas, could you indicate which SPARQL 1.1 spec you are referencing, 
and the section? Thanks. It looks like predicate paths in 1.1 may 
resolve this. The main thing is to try some actual queries against 
actual data. I will do that later today. I will try the search using 
triples to avoid the issue of skolemizing behind the scenes, and against 
more than one software package. (Soroka, could you try the triples I 
provided using Jena? Thanks.)

kc
[1] begins here: 
http://listserv.loc.gov/cgi-bin/wa?A2=ind1407&L=bibframe&T=0&P=8956

On 8/1/14, 8:52 AM, Thomas Berger wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Karen,
>
>> <http://example.org/1>  a bf:Instance,
>>       bf:publication [
>>           a bf:Provider ;
>>           bf:providerDate "1966" ;
>>           bf:providerName [ a bf:Organization ; bf:label "Hamlyn" ] ;
>>           bf:providerPlace [ a bf:Place ; bf:label "London" ]
>>       ] .
>>
>> The reason is that you cannot step through blank nodes to select only the
>> bf:label for either bf:providerName or bf:providerPlace. This search does not
>> work on triples with blank nodes:
>>
>> SELECT ?subject ?label
>>       WHERE { ?subject bf:providerName ?bnode .
>>                    ?bnode bf:label ?label . }
> But it is supposed to work by the spec (SPARQL 1.1)!
>
>
> And also with blank nodes in the query:
>
> SELECT ?subject ?label
>       WHERE { ?subject bf:providerName [ bf:label ?label .] . }
>
>
> and thirdly with "predicate paths":
>
> SELECT ?subject ?label
>       WHERE { ?subject bf:providerName/bf:label ?label . }
>
>
> viele Gruesse
> Thomas Berger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iJwEAQECAAYFAlPbt68ACgkQYhMlmJ6W47PMHAP/YQQ+WObVBDk5VP/exerBnpGL
> 3AOZqEb9FzvEmsD6IiZo9RnIdFkagPWg1s3r6q2mW5Ye+IvVojsucc5aZucnHy2t
> NfFrHdHTKRNReaenLXnIGUe90udHynWDjy83q3u/XOR1jR6raQlyfTmnWWie1fA5
> doOeWsW5xsdRgZHqQss=
> =AaOY
> -----END PGP SIGNATURE-----

-- 
Karen Coyle
[log in to unmask] http://kcoyle.net
m: 1-510-435-8234
skype: kcoylenet