How can I cast a literal object value to a URI that I can use as a predicate value?
I tried this:
prefix ais: <http://AIS.org/>
?i a ais:AssignmentContext .
?i ais:physical_column_name ?l .
?i uri(fn:concat("ais:", ?l))
but got an error.
The function you are looking for is called
In the larger context of your query, you need to use
BIND in order to use the generated IRI as a predicate variable, e.g.:
BIND(iri(fn:concat("ais:", ?l)) AS ?pred)
?i ?pred ?obj
Thanks Jess, what do you use for the fn: prefix
I tried prefix fn: http://www.w3.org/2005/xpath-functions#concat
but got an internal server error.
CONCAT() is a builtin function so can also call it without any prefix just like you do with IRI()
Yes, that works nicely also.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.