-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RMLMapper: URI Encoding Issue with Colon (:) in RDF Subjects #243
Comments
I have the feeling this is a similar issue as #219 , with follow-up action captured at kg-construct/rml-core#72 : i'm afraid the only current solution is following something similar to #219 |
Hello, Thank you for the quick reply. I tried to modify the mapping file. However, I got some error information. Could you help me to identify what is the problem?
Modified RML Mapping File@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix brick: <https://brickschema.org/schema/Brick#> .
@prefix ex: <http://example.com#> .
@prefix rec: <https://w3id.org/rec/core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix fnml: <http://semweb.mmlab.be/ns/fnml#> .
@prefix fno: <https://w3id.org/function/ontology#> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
# Mapping for HotelRoom
ex:MappingHotelRoom
a rr:TriplesMap ;
rml:logicalSource [
rml:source "entities_example.json" ;
rml:referenceFormulation ql:JSONPath ;
rml:iterator "$[?(@.type == 'HotelRoom')]" ;
] ;
rr:subjectMap [
fnml:functionValue [
fnml:execution [
fno:function grel:concat ;
grel:inputString1 [ rr:constant "http://example.com/hotel/" ] ;
grel:inputString2 [ rml:reference "id" ] ;
] ;
] ;
rr:class rec:Room ;
] ;
rr:predicateObjectMap [
rr:predicate brick:hasLocation ;
rr:objectMap [
rml:reference "hasLocation.value" ;
] ;
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label ;
rr:objectMap [
rml:reference "name.value" ;
] ;
] . Error information
|
Hello,
I am experiencing an issue with RMLMapper where colons (:) in the id field of my JSON data are getting encoded into %3A in the resulting RDF knowledge graph. Below are the details of my input files and mapping.
JSON Input
RML Mapping File
Output RDF
Issue
As seen in the RDF output, the colon (:) in the id field (HotelRoom:room_101) has been URL-encoded as %3A. I would like to prevent this encoding and preserve the original id value in the URI, i.e., I want it to appear as http://example.com/hotel/HotelRoom:room_101 instead of http://example.com/hotel/HotelRoom%3Aroom_101.
Question
Is there any option in RMLMapper to disable or customize the URI encoding for the id values, especially for characters like the colon (:)? Alternatively, is there a specific configuration I should use in the RML mapping file to achieve this?
Any guidance or suggestions would be greatly appreciated!
The text was updated successfully, but these errors were encountered: