-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
When a literal is used as the value of rr:constant, its datatype is ignored and it is rendered as a string instead.
Example:
data.json
[ { "id": "0", "foo": "bar" } ]
map.ttl
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
[
a rr:TriplesMap;
rml:logicalSource [
rml:source "data.json" ;
rml:referenceFormulation ql:JSONPath ;
rml:iterator "$[*]";
];
rr:subjectMap [
rr:template "https://example.org/instances/{id}";
];
rr:predicateObjectMap [
rr:predicate <http://example.org/ns/p> ;
rr:object true ; # <-- the constant is an xsd:boolean
];
] .
The result is
<https://example.org/instances/0> <http://example.org/ns/p> "true" .
(note that the object is a string)
I would have expected this:
<https://example.org/instances/0> <http://example.org/ns/p> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
I can work around this issue by replacing rr:object true with
rr:objectMap [ rr:constant "true"; rr:datatype xsd:boolean ]
but that should not be necessary.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested