Print

Print


Actually, here's a better page of "answers" [1] which says:

"Many systems take a skolemised view of blank-nodes as ground 
(instantiated) terms in their own right. Even still, if I pose one query 
to a SPARQL endpoint in which I get a binding |_:bnode1|, I cannot 
subsequently ask for more information about |_:bnode1| without 
reconstructing and extending the previous query, and/or using some 
swanky filters."

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

On 7/15/14, 6:47 PM, Karen Coyle wrote:
> Simon, let me go back to my original question:
>
> This is a simplified version of the BIBFRAME data:
>
> :instance27 bf:publication _:genid4 .
> _:genid4 bf:providerName _:genid5 .
> _:genid5 bf:label "Morrow" .
>
> It perhaps makes more sense to look at it in the RDF/XML, before 
> converting it to triples:
>
>  <bf:publication>
>       <bf:Provider>
>         <bf:providerName>
>           <bf:Organization>
>             <bf:label>Morrow</bf:label>
>           </bf:Organization>
>         </bf:providerName>
>       </bf:Provider>
>     </bf:publication>
>
> Assuming this is behind a SPARQL end-point (or an imitation thereof), 
> to retrieve the bf:label for the bf:providerName, you need to be able 
> to make a sparql query that finds the subject of a triple with 
> predicate bf:providerName, then uses that IRI as the subject of the 
> query seeking the bf:label.  It appears, however, that this does not 
> work when the object later used as a subject is a bnode.
>
> The query below, which I thought would work, fails to return anything:
>
> PREFIX bf: <http://bibframe.org/vocab/>
> SELECT ?subject ?label
>     WHERE { ?subject bf:providerName ?bnode .
>                  ?bnode bf:label ?label . }
>
> EXCEPT when the blank nodes are converted to actual IRIs (which 
> Virtuoso does when it interprets RDF/XML). That is, with actual 
> bnodes, the query fails; with skolemized [1] identifiers, it succeeds.
>
> I think there is a hint in this answer online: " with a 
> SPARQL-compliant system it is not possible to refer to the identifier 
> of a blank node in the queried graph from within a SPARQL query 
> pattern. " [2] However, I can't find an example that looks like the 
> BIBFRAME case, and that particular "explanation" isn't crystal clear 
> to me.
>
> (Maybe I should post a query to the "answers" forum.)
>
> kc
> [1] https://en.wikipedia.org/wiki/Skolem_normal_form
> [2] 
> http://answers.semanticweb.com/questions/1673/skolem-syntax-for-blank-nodes-in-sparql
>
>
>
> On 7/15/14, 5:39 PM, Simon Spero wrote:
>> It is generally better to avoid blank nodes in SPARQL queries, since 
>> it is usually  clearer if you use  ?y instead of _:y .
>>
>> Simon
>>
>>
>> On Tue, Jul 15, 2014 at 8:37 PM, Simon Spero <[log in to unmask] 
>> <mailto:[log in to unmask]>> wrote:
>>
>>     That's would be the same query (and same basic graph pattern).
>>
>>
>>     On Tue, Jul 15, 2014 at 7:18 PM, Karen Coyle <[log in to unmask]
>>     <mailto:[log in to unmask]>> wrote:
>>
>>         On 7/15/14, 10:47 AM, Simon Spero wrote:
>>
>>             4. There is no problem with a SPARQL  query binding a
>>             variable to a blank node; however it can be difficult to
>>             use the value in second query.
>>
>>         Simon, I admit that I struggle often with the terseness of
>>         your prose. Is this #4 your statement of the problem that I
>>         ran into, as per my original post? In other words, is
>>
>>         Where {
>>         X p _y .
>>         _y p Z .
>>         }
>>
>>         using the value in a second query? If not, does one of your
>>         other points address this?
>>
>>         thx,
>>
>>         kc
>>
>>         -- 
>>         Karen Coyle
>>         [log in to unmask] <mailto:[log in to unmask]> http://kcoyle.net
>>         m: 1-510-435-8234 <tel:1-510-435-8234>
>>         skype: kcoylenet
>>
>>
>>
>
> -- 
> Karen Coyle
> [log in to unmask]  http://kcoyle.net
> m: 1-510-435-8234
> skype: kcoylenet

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