Closed chrdebru closed 7 months ago
Yes, I raised this issue and a couple of others quite a while ago: https://github.com/kg-construct/rml-test-cases/issues/14
Seems like these haven't been fixed yet.
Also, all test cases with json path expressions should use expressions that match the latest JSONPath draft https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/
So in this case that would be:
rml:subjectMap [ rml:template "http://example.com/{$.['Country Code']}" ];
Apologies for not thinking of having a look at the other repository. We should rewrite alls the JSON mappings.
Yes, the test-cases must be updated to follow now the JSONPath draft spec at IETF.
A separate issue as this seems to be more profound: we should assume valid JSON Path expressions in templates and references when they contain spaces or special characters. The problem is this:
rml:subjectMap [ rml:template "http://example.com/{Country Code}" ];
The reference formulation is JSONPath, but the reference expression in the subject map is not valid in JSON Path (it should be
['Country Code']
. Would we even allow this as this? What if you havex.foo bar.y[*]
? R2RML has a whole section on valid column names for templates. This could be a slippery slope for simple references. I do not believe that you can transform these with string manipulation. For instance, wouldfoo bar.yay
become['foo bar.yay']
or['foo bar'].yay
?I therefore propose that the test case and the desired approach should be this:
rml:subjectMap [ rml:template "http://example.com/{['Country Code']}" ];
In other words, only accept a simple reference if it respects the JSON Path's dot notation.
This problem also holds for 10a-JSON and others.