oeg-upm / yatter

Translate YARRRML into easy-to-read [R2]RML mappings

Home Page:https://doi.org/10.5281/zenodo.7024500

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resolve prefixes in the generation of SubjectMap

marioscrock opened this issue · comments

Describe the bug
Considering a SubjectMap s: ex:person/$(firstname) and a prefix ex, the prefix is not resolved when generating the SubjectMap.

To Reproduce
Use this mapping file

prefixes:
  ex: "http://example.com/"

mappings:
  person:
    sources:
      - ['persons.json~jsonpath', '$.persons[*]']
    s: ex:person/$(firstname)
    po:
      - [a, foaf:Person]

Expected behavior
In the SubjectMap generated the ex: is resolved as http://example.com/.

rr:subjectMap [
		a rr:SubjectMap;
		rr:template "http://example.com/person/{firstname}";
	];

Sorry for the late fix, but now prefixes are substituted in any TermMap with reference and prefixes.