Thanks Gautier! I'm kind of confused about why filtering on language
tag is necessary, but it certainly seems to work.

//Ed

On Tue, Oct 12, 2010 at 5:22 PM, Gautier Poupeau
<[email protected]> wrote:
> You should specify the lang of the label :
>
> SELECT ?publisher ?abstract ?publisherName
> WHERE {
>    ?publisher <http://www.w3.org/2004/02/skos/core#subject>
> <http://dbpedia.org/resource/Category:Book_publishing_companies_of_the_United_States>.
>    ?publisher <http://dbpedia.org/ontology/abstract> ?abstract .
>    ?publisher <http://www.w3.org/2000/01/rdf-schema#label> ?publisherName .
> FILTER (lang(?publisherName)='en')
> }
>
> This query works fine : http://bit.ly/dcQhXS
>
> Cheers
> Gautier Poupeau
>
> On Tue, Oct 12, 2010 at 11:07 PM, Ed Summers <[email protected]> wrote:
>>
>> I was wondering if I could get some help/advice with a sparql query
>> I'm running against dbpedia. I've got this query to get a list of US
>> publishers and their abstract which returns nicely [1]:
>>
>> SELECT ?publisher ?abstract
>> WHERE {
>>    ?publisher <http://www.w3.org/2004/02/skos/core#subject>
>>
>> <http://dbpedia.org/resource/Category:Book_publishing_companies_of_the_United_States>
>> .
>>    ?publisher <http://dbpedia.org/ontology/abstract> ?abstract .
>> }
>>
>> But if I add a match for the rdfs:label I get no results [2]
>>
>> SELECT ?publisher ?abstract ?publisherName
>> WHERE {
>>    ?publisher <http://www.w3.org/2004/02/skos/core#subject>
>>
>> <http://dbpedia.org/resource/Category:Book_publishing_companies_of_the_United_States>
>> .
>>    ?publisher <http://dbpedia.org/ontology/abstract> ?abstract .
>>    ?publisher <http://www.w3.org/2000/01/rdf-schema#label> ?publisherName
>> .
>> }
>>
>> Am I overlooking something obvious here? I thought that all the
>> ?publisher resources would have an rdfs:label...
>>
>> //Ed
>>
>> [1] http://bit.ly/aLD1TZ
>> [2] http://bit.ly/avmqBQ
>
>
>
> --
> --------------------------------------------------------------------------
> Gautier Poupeau
> Antidot     |    GSM: +33 (0)6 45 49 59 77
> F-75 Paris       |   mailto: [email protected]
> Blog : Les petites cases | Twitter : @lespetitescases
> --------------------------------------------------------------------------
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to