Question regarding XRM and XML to RDF mapping


#1

I am testing out the XRM tooling for mapping XML (unfortunately, JsonPath seems not to be supported).

In RML, I can easily map two different Paths using something like

    <#S1>
    rml:logicalSource [
        rml:source [ a carml:Stream; carml:streamName "stdin"; ] ;
        rml:referenceFormulation ql:XPath ;
        rml:iterator "/xpath1" ;
    ] ;

    rr:subjectMap [
        rr:template "http://my.url/{p1}/{p2}" ;
        rr:class ex:Class ;
    ] .

    <#S2>
    rml:logicalSource [
        rml:source [ a carml:Stream; carml:streamName "stdin"; ] ;
        rml:referenceFormulation ql:XPath ;
        rml:iterator "/xpath2" ;
    ] ;

    rr:subjectMap [
        rr:template "{urn}" ;
        rr:class ex:Class ;
    ] ;

    rr:predicateObjectMap [
        rr:predicate ex:hasRelatedClass ;
        rr:objectMap [
        rr:parentTriplesMap <#S1> ;
        rr:joinCondition [
            rr:child "r1.p1" ;
            rr:parent "p1" ;
        ] ;
        rr:joinCondition [
            rr:child "r1.p2" ;
            rr:parent "p2";
        ] ;
        ] ;
    ] .

But I found no solution how to map this join conditions in XRM. Does anyone know if it’s supported?


#2

Hi Rico

Join conditions are not supported in XRM. So far we only added features that we use a lot ourselves. If mapping with join conditions is something that you are using a lot and would like to have supported in XRM, then please open an issue for this feature request on the github project.

https://github.com/zazuko/expressive-rdf-mapper

Same goes for support for “ql:JSONPath” which is at the moment not supported either.

Regards,
Michael


#3

I use RML quite a lot but I never do joins via join conditions, I simply create a bunch of template IRIs and then map them via templates. In other words I let RDF worry about it when I load it to an endpoint.

Not sure if you get what I mean, if not I can show an example.