I am a new one on semantic web. I would like to get all object/values for Microsoft from DBPedia using SPARQL query and save result in RDF format. I have made a query on http://dbpedia.org/sparql which works well and returns all pair/values regarding Microsoft.The code is as follows:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
select * where
{{ <http://dbpedia.org/resource/Microsoft> ?property ?value }
UNION
{?property ?value <http://dbpedia.org/resource/Microsoft>}}
What I want is to create RDF format for the results. I read tutorial on https://www.w3.org/TR/rdf-sparql-query/#construct and understood it can be done by using CONSTRUCT query. I changed SELECT to CONSTRUCT, but that did not work. If possible could you tell me what is my mistake and how can I apply CONSTRUCT to my query to get RDF model from the query please? Thanks in advance!
<dbpedia.org/resource/Microsoft>
) is missing. This brings me to the second problem, you have to use property URIs otherwise the are relative. I.e. in the example the protocol is missing, i.e. it should be<http://dbpedia.org/resource/Microsoft>
. Moreover, the syntax is wrong as you have two semicolons that must not be there. – UninformedUser