Wimmics / corese

Software platform implementing and extending the standards of the Semantic Web.
https://project.inria.fr/corese/
Other
103 stars 29 forks source link

[Bug] Corese-command sparql returns XML instead of ntriples with -of ntriples #166

Closed MaillPierre closed 10 months ago

MaillPierre commented 10 months ago

Issue Description:

Corese-command sparql returns XML instead of ntriples when used with -of ntriples or -of nt with a CONSTRUCT query.

Bug Details:

Corese-command returns result in standard XML SPARQL format.

Steps to Reproduce:

  1. Download the following file
  2. write the following query into generic_endpoint_construct.rq
    
    PREFIX void: <http://www.w3.org/2002/07/owl#>
    PREFIX dcat: <http://www.w3.org/ns/dcat#>
    PREFIX kgi: <http://ns.inria.fr/kg/index#>
    PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>

CONSTRUCT { ?dataset dcat:endpointURL ?sparql . } WHERE { { ?s ?p ?URL . } UNION { GRAPH ?g { ?s ?p ?URL . } } BIND(IRI(STR(?URL)) as ?sparql) FILTER (?p IN (void:sparqlEndpoint, dcat:endpointURL, sd:endpoint)) BIND (IRI(CONCAT(STR(kgi:), ENCODE_FOR_URI(?sparql))) AS ?dataset) }


3. `java -jar corese-command-4.5.0.jar sparql -i lod-data.ttl -o lod_endpoints.nt -q generic_endpoint_construct.rq -of ntriples`
4. lod_endpoints.nt contains XML

**Expected Behavior:**

`lod_endpoints.nt` should contains NTriples
remiceres commented 10 months ago

Hello Pierre,

Thank you for your report. You are right; I forgot to take this case into account. I have fixed the issue, and it will be available in the next release.