Cannot BIND datatype

17 views
Skip to first unread message

Pasquale Di Donato

unread,
Nov 27, 2017, 7:57:04 AM11/27/17
to ta...@googlegroups.com
Hallo list,

I'm trying to assing a data type to a value via BIND. E.g.

BIND (geo:wktLiteral(?WKT) AS ?WKT)

where geo is a PREFIX to <http://www.opengis.net/onto/geosparql#>

The data gets converted but without the data type. I get a warning:

WARN URI <http://www.opengis.net/onto/geosparql#wktLiteral> has no registered function factory.

Could you please help here?

Many thanks
Pasquale


Richard Cyganiak

unread,
Nov 28, 2017, 7:18:15 AM11/28/17
to Pasquale Di Donato, ta...@googlegroups.com
Hi Pasquale,

What is geo:wktLiteral? It’s a datatype? In that case, you want:

    STRDT(?WKT, geo:wktLiteral)

which is how you create a typed literal for a custom datatype in SPARQL:


(In systems that have GeoSPARQL support, geo:wktLiteral is probably *also* a constructor function that constructs typed literals of type geo:wktLiteral, in the same way how the XSD datatypes work as constructor functions in vanilla SPARQL. But Tarql doesn’t have GeoSPARQL support, so it doesn’t know about these constructor functions, and hence you need to create the typed literals the pedestrian way, with STRDT.)

Also I don’t think that re-binding an existing variable to a different value will work. So you probably will need to bind to a new variable:

    BIND (… AS ?WKT_typed)

Hope that helps,
Richard




--
You received this message because you are subscribed to the Google Groups "Tarql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tarql+un...@googlegroups.com.
To post to this group, send email to ta...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tarql/CAJA5qQKn3mKzvV2%3D0_BsCrCvy4f6Xn0V%3DkrQ4GewFaqjKXy%3DPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages