Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vocabulary elements used as constant value don't contribute their PREFIX #151

Closed
mchlrch opened this issue Dec 13, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@mchlrch
Copy link
Member

mchlrch commented Dec 13, 2023

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

Originally posted by @mchlrch in #142 (comment)

@mchlrch mchlrch added the bug Something isn't working label Dec 13, 2023
@mchlrch mchlrch closed this as completed Dec 13, 2023
mchlrch added a commit to zazuko/expressive-rdf-mapper that referenced this issue Dec 18, 2023
@mchlrch
Copy link
Member Author

mchlrch commented Dec 19, 2023

Resolved in xrm version 1.5.0

mchlrch added a commit that referenced this issue Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant