zazuko / xrm

A friendly language for mappings to RDF
MIT License
1 stars 0 forks source link

RML Reference implementation does not like XRM Turtle output #138

Closed ktk closed 2 years ago

ktk commented 3 years ago

It looks like the RML reference implementation RML Mapper is using a stricter Turtle parser than pretty much anything I tested so it will not run the mapping. When I convert it, it works.

I tried figuring out what it is but couldn't find a version that worked. Not sure how to proceed.

mchlrch commented 3 years ago

We don't explicitly validate the generated turtle. I think that so far people have used the generated mappings with processors that have tolerant parsers and therefore no issues.

Here are a few places were the generated turtle is lax and might cause validation issues:

<#AirportMapping>
    rml:logicalSource [
        rml:source "http://www.example.com/Airport.csv" ;
        rml:referenceFormulation ql:CSV      <<==
    ];

    rr:subjectMap [
        rr:template "http://airport.example.com/{id}" ;
        rr:class transit:Stop ;      <<==
    ];

    rr:predicateObjectMap [
        rr:predicate transit:route ;
        rr:objectMap [
            rml:reference "stop" ;
            rr:datatype xsd:integer ;      <<==
        ];      <<==
    ];
mchlrch commented 2 years ago

With XRM version 1.2.0, the generated turtle files now have stricter syntax compliance.