-
Notifications
You must be signed in to change notification settings - Fork 35
Prevent keyword alias to be declared as prefix #154
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the discussion, we should also have a test without @prefix: true
that would not flag an error, but also not expand.
Resolution #4: When encountering a term in the form of a compact IRI for which the prefix would expand to a keyword, do not expand the term.
<li>If the <a>prefix flag</a> of <var>definition</var>is set to <code>true</code>, | ||
and its <a>IRI mapping</a> is a <a>keyword</a>, | ||
an <a data-link-for="JsonLdErrorCode">invalid term definition</a> | ||
has been detected and processing is aborted.</li> | ||
</ol> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to say "has the form of a keyword", so that @the-next-keyword
would be rejected too. This is related to another discussion from the F2F, for which we don't yet have an open issue: we want to discourage the use of things that may be keywords in the future (should => must).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per w3c/json-ld-syntax#16, keyword-like strings MUST be ignored and SHOULD result in a processor warning. I'll add text and tests to ensure they're ignored (with and without @vocab
), but we can't test for warnings.
Also, after changing the test manifest, please run |
I have more tests coming on variations of using keyword patterns, to satisfy w3c/json-ld-syntax#16 as well. |
NB: should we have a dedicated error for that?
…egin with `@`, or the term maps to something of this form.
…o add toRdf verion of pr33.
84cf81e
to
c9e9d90
Compare
addresses #153
Preview | Diff