Nathan, Ivan,
Thanks for the help but it does not yet solve my problem.
I tried the solution as you suggested, unfortunately without success:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?p ?pl ?o from <http://fadyart.com/sdnList>
where {
?s ?p ?o .
?p rdfs:label ?pl .
FILTER (?s=<#SdnEntry_2786786>)
}
To be sure the parameter is correct, ran the following query:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?p ?pl ?o from <http://fadyart.com/sdnList>
where {
?s ?p ?o .
FILTER (?s=<#SdnEntry_2786786>)
}
This gives perfectly what I need but without the labels (of course).
I have the impression the ?p values in the where-clause are not linked (?s
?p ?o .) versus (?p rdfs:label ?pl .)
Agree that ?s will not be filled but:
- with other SPARQL engines I get the correct result in addendum (tab
separated) Of course, I will make sure now ?s is defined.
- when I leave out ?s (it is a parameter query in vsp pages, so I leave it
to save SPARQL instructions normaly) there is no difference
- I tried earlier also different filter options and combinations like the
ones following:
BASE <http://fadyart.com/sdnList>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?pl ?o
where {
?s ?p ?o .
?p rdfs:label ?pl .
?s rdf:ID <#SdnEntry_2786786> .
}
BASE <http://fadyart.com/sdnList>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?pl ?o
where {
?s ?p ?o .
?p rdfs:label ?pl .
FILTER( rdf:ID = <#SdnEntry_2786786>)
}
Am using Virtuoso 6 and the queries are launched with iSQL, sparql_demo and
sparql interfaces with the same results.
I'm sorry for this apparently very stupid problem.
Knd regards
Eddy
----- Original Message -----
From: "Nathan" <[email protected]>
To: "Eddy Vanderlinden" <[email protected]>
Cc: <[email protected]>
Sent: Monday, December 21, 2009 12:10 PM
Subject: Re: [Virtuoso-users] Newbie questions
Eddy Vanderlinden wrote:
Hello,
Sorry for my 2 stupid questions which will have a sound and simple reply
but I no-where found any answer in the documentation.
1. A simple SPARQL select query:
I've been running similar to the next query, in hundreds of variants
(with parameters) but I don't get a reply in Virtuoso:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?p ?pl ?o
where {
<#SdnEntry_2786786> ?p ?o .
?p rdfs:label ?pl .
}
The aim is just to get the labels of the properties in the output.
The query runs successfully in other SPARQL engines with the same data.
When I make the union:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?p ?pl ?o
where {
{<#SdnEntry_2786786> ?p ?o}
UNION
{?p rdfs:label ?pl}
}
I get the pairs property/value and property/label separately.
So, I can't filter the result neither.
My question: what am I missing here ?
newb myself, but looks like you've got select ?s but no ?s param in the
query(ies)
regards!
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and
easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users
[s] pl o
first name first name value
date of birth data of birth value
country of birth country of birth value
citizenship Citizenshipvalue
label Sdn entry_1
comment
type SdnEntry