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 in vocabs.xrm. In the newly generated mapping.carml.ttl, the prefix stabs-rstis not declared. Carml throws the error:
error: Undefined prefix "stabs-rst:" on line 131
If I use it in types, and not as a constant, the declaration is done.
@oschihin That sounds like a bug. Thanks for reporting it
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.@oschihin That sounds like a bug. Thanks for reporting it
Originally posted by @mchlrch in https://github.com/zazuko/xrm/issues/142#issuecomment-1840967179