Hello Andy, Thanks a lot, this works as I wish. It looks like I missed something in the doc.
2016-01-06 20:16 GMT+01:00 Andy Seaborne <[email protected]>: > On 06/01/16 18:49, Nicolas Paris wrote: >> >> Hello, >> >> Is there a way to cast a literal to an IRI within SPARQL in jena ? >> (link to sparql 1.1 doc) >> http://www.w3.org/TR/sparql11-query/#func-iri >> >> eg: I have got triple: >> >> foo bar "baz"^^anyUri >> baz rdf:label "tiz"^^xsd:string >> >> I would like to query : >> >> foo bar ?baz >> IRI(?baz) rdf:label ?tiz >> >> then i would like to get : >> >> ?tiz = "tiz"^^xsd:string >> >> Thanks by advance, >> > > BIND assigns function values to to new variables: > > foo bar ?baz > BIND(IRI(str(?baz)) as ?baz_iri) > ?baz_iri rdfs:label ?tiz
