Skip to content

Redefining keywords in context should throw an exception #210

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

Closed
dlongley opened this issue Jan 18, 2013 · 4 comments
Closed

Redefining keywords in context should throw an exception #210

dlongley opened this issue Jan 18, 2013 · 4 comments

Comments

@dlongley
Copy link
Member

According to #102, we decided that an attempt to redefine a keyword in the context should throw an exception. The spec text in the Context Processing Algorithm (http://json-ld.org/spec/latest/json-ld-api/#context-processing), in step 2.4.3.2, merely ignores these redefinitions.

If we should be triggering an error for this, then this expansion test also needs to be changed/removed (or made into an error unit test ... of which we don't have any yet):

https://github.com/json-ld/json-ld.org/blob/master/test-suite/tests/expand-0043-in.jsonld

@lanthaler
Copy link
Member

You are right. I forgot that decision. So, should we throw an error or just ignore it? I don’t have a strong opinion but I think throwing an error might makes slightly more sense in this case. Thoughts?

@dlongley
Copy link
Member Author

I think we should throw an error here; as I do with most context processing issues. I think it's safer to ignore errors like this when processing documents; I'd prefer to be more strict when dealing with contexts since they are reused across many documents and should be refined/fixed.

@lanthaler
Copy link
Member

+1

1 similar comment
@gkellogg
Copy link
Member

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants