You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Daniel Hernandez <da...@degu.cl> on 2022/12/05 15:15:01 UTC

Support of RDF-star quoted triples in query results

Hi everyone,

I loaded the following data in Fuseki 4.6.1:

@prefix : <http://example.org/> .
<< :Bob :hasFriend :Alice >> :accordingTo :Alice .

Then, the following query returns :Bob and :Alice, as expected.

PREFIX : <http://example.org/>
SELECT ?s ?o
WHERE {
  << ?s ?p ?o >> ?q ?v. 
}

However, the following query returns an error "e[t].value.replace is not
a function" in the Fuseki UI when selecting the output type as JSON:

PREFIX : <http://example.org/>
SELECT ?t
WHERE {
  ?t ?q ?v .
}

And the following query returns :Alice (without error):

PREFIX : <http://example.org/>
SELECT ?v
WHERE {
  ?t ?q ?v .
}

However, the problematic query works without the Fuseki UI.

curl -G http://localhost:3030/ds/sparql --data-urlencode \
     query='SELECT ?t WHERE { ?t ?q ?v }'
{ "head": {
    "vars": [ "t" ]
  } ,
  "results": {
    "bindings": [
      { 
        "t": {
          "type": "triple" , 
          "value": {
            "subject":  { "type": "uri" , "value": "http://example.org/Bob" } ,
            "predicate": { "type": "uri" , "value": "http://example.org/hasFriend" } ,
            "object":   { "type": "uri" , "value": "http://example.org/Alice" }
          }
        }
      }
    ]
  }
}

It seems that this issue only affects the Fuseki UI.

Daniel

Re: Support of RDF-star quoted triples in query results

Posted by Andy Seaborne <an...@apache.org>.
The Fuseki the server does handle RDF-star quoted triples.
(otherwise the UI couldn't get an error!)

So this is the Fuseki UI only.

Display of results uses the Yasr component of Yasgui.

https://github.com/TriplyDB/Yasgui

     Andy

There is:
https://github.com/TriplyDB/Yasgui/issues/190

On 05/12/2022 15:15, Daniel Hernandez wrote:
> 
> Hi everyone,
> 
> I loaded the following data in Fuseki 4.6.1:
> 
> @prefix : <http://example.org/> .
> << :Bob :hasFriend :Alice >> :accordingTo :Alice .
> 
> Then, the following query returns :Bob and :Alice, as expected.
> 
> PREFIX : <http://example.org/>
> SELECT ?s ?o
> WHERE {
>    << ?s ?p ?o >> ?q ?v.
> }
> 
> However, the following query returns an error "e[t].value.replace is not
> a function" in the Fuseki UI when selecting the output type as JSON:
> 
> PREFIX : <http://example.org/>
> SELECT ?t
> WHERE {
>    ?t ?q ?v .
> }
> 
> And the following query returns :Alice (without error):
> 
> PREFIX : <http://example.org/>
> SELECT ?v
> WHERE {
>    ?t ?q ?v .
> }
> 
> However, the problematic query works without the Fuseki UI.
> 
> curl -G http://localhost:3030/ds/sparql --data-urlencode \
>       query='SELECT ?t WHERE { ?t ?q ?v }'
> { "head": {
>      "vars": [ "t" ]
>    } ,
>    "results": {
>      "bindings": [
>        {
>          "t": {
>            "type": "triple" ,
>            "value": {
>              "subject":  { "type": "uri" , "value": "http://example.org/Bob" } ,
>              "predicate": { "type": "uri" , "value": "http://example.org/hasFriend" } ,
>              "object":   { "type": "uri" , "value": "http://example.org/Alice" }
>            }
>          }
>        }
>      ]
>    }
> }
> 
> It seems that this issue only affects the Fuseki UI.
> 
> Daniel