This is one of the most confusing question I ever read here... What is in your ontology? Sample data please! (in Turtle or N-Triples syntax)
More comments inline: On 18.10.2017 20:10, javed khan wrote: > Good day > > I want to ask is it possible we access Dbpedia resource with a variable > name. Have you tried it? > For example, we have ontology which include rdfs:comment about different > cities and cities name are in our ontology and store in x variable > > ?x rdfs:comment ?y //This query works for me It works locally on your ontology - this is not a surprise as long as the query matches some data. > > Now we want to directly access Dbpedia server (not using ontologiy) for > these cities and this time we want to access rdfs:abstract, so can we use There is no property rdfs:abstract in the RDFS vocabulary. Dbpedia has its own ontology, a property that you might mean is http://dbpedia.org/ontology/abstract > > ?x rdfs:abstract ?sbstract Typo in variable name... > > If not , how can we access then rdfs:abstract of different cities stored in > x Again, why can't you try it out? Is somebody/something preventing you from sending a SPARQL query to the DBpedia SPARQL endpoint? The expression "cities stored in x" doesn't make sense - or what is x for you? the dataset? If you have cities in your ontology, then you have to use those URIs as binding for variable ?x - and this only works if the URIs are the same. But again, we don't know your data. Alternative would be to match on the city name, but this is indeed bad practice as city names are ambiguous
