zazuko / xrm

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

Support rml:iterator #27

Closed mchlrch closed 4 years ago

mchlrch commented 5 years ago

XML and JSON mappings usually require an rml:iterator to define the repetition pattern.

The DSL should allow optional definition of iterator in the logical-source:

logical-source airport {
    type xml
    source "http://www.example.com/Airport.xml"
    iterator "/Airports/Airport"

    referenceables
        ...
}
nnamtug commented 4 years ago
logical-source EMPLOYEE {
    type xml
    source "EMP"
    iterator "/Employees/Employee"

will now produce (editortest.rml.ttl)

    rml:logicalSource [
        rml:source "EMP" ;
        rml:referenceFormulation ql:XPath
        rml:iterator "/Employees/Employee";
    ];