SMS to R2RML does not retain language tag

Stardog 7.0.2

Exporting an R2RML mapping that was loaded as SMS with a template that included a language tag does not include rr:language predicate.

SMS

<{geonameid}> gn:alternateName "{\"alternatename\"}"@{isolanguage};

R2RML

 <tag:stardog:api:mapping:generated:mapping-1302478374>
    a rr:TriplesMap ;
    rr:subjectMap [
        rr:template "http://sws.geonames.org/{geonameid}/" ;
            rr:termType rr:IRI
    ] ;
    rr:predicateObjectMap [
        rr:objectMap [
            rr:column "\"alternatename\"" ;
                rr:datatype <http://www.w3.org/2001/XMLSchema#string>
        ] ;
        rr:predicateMap [
            rr:constant gn:alternateName
        ]
    ] ;

Does R2RML even allow the language to be specified from a column? The specs say it must take a valid language tag but it doesn't say that it can be a template. Ugh, looks like that's not part of the spec. That’s a major oversight. The language tag is now trivial or useless. /rant

This is a bug in the conversion process (#7936). The fix should be in the next release.

You're right that the R2RML spec doesn't support column-mapped language tags but we support it. You can change the R2RML by hand, for now, by adding an rr:language template:

    rr:predicateObjectMap [
        rr:objectMap [
            rr:column "\"alternatename\"" ;
            rr:language "{isolanguage}" ;
            rr:datatype <http://www.w3.org/2001/XMLSchema#string>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.