Vocabulary elements used as constant value don't contribute their PREFIX
Closed this issue · 1 comments
Since XRM version 1.2.0 it is possible to use vocabulary elements (class, property, datatype) as a constant value.
Used in this way, the vocabulary elements don't contribute their PREFIX
and the generated mapping files can end up being incomplete, with undefined prefixes.
@mchlrch a little bit later ... I am on XRM version 1.3, and your example above should work. It doesn't, because using that class declaration does not update declarations in the mapping file:
I do (in mapping.xrm):
map level_archive from stabs_ogd.rr_archive { subject template rrURI with ID_NR; types rico.RecordSet properties rico.history from ARCHIVGESCHICHTE with language-tag ger; // @todo: use rico.Event class later rico.hasRecordSetType constant stabslevels.Archiv; }
stabslevels.Archiv
is declared as a class invocabs.xrm
. In the newly generatedmapping.carml.ttl
, the prefixstabs-rst
is not declared. Carml throws the error:error: Undefined prefix "stabs-rst:" on line 131
If I use it in
types
, and not as aconstant
, the declaration is done.
@oschihin That sounds like a bug. Thanks for reporting it
Originally posted by @mchlrch in #142 (comment)
Resolved in xrm version 1.5.0