Skip to content

PyLD incorrectly detects circular contexts in scoped context processing #88

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

Open
azaroth42 opened this issue Oct 24, 2018 · 0 comments
Open

Comments

@azaroth42
Copy link
Contributor

Summary:

When processing scoped contexts, PyLD errors when a remote context has already been seen at a higher scope, when this is not an error in JSON-LD 1.1.
See: w3c/json-ld-api#14 (comment)
And playground link demonstrating it working in Javascript: http://tinyurl.com/yayh6e74

Current Behavior:

Exhibited in: https://raw.githubusercontent.com/w3c/json-ld-api/recursive-test/tests/recursive/process.py

When context A refers to context B within a scope, and context B refers to context A in a scope, then processing terminates with the error:

Type: jsonld.ExpandError
Cause: ('Cyclical @context URLs detected.',)

These are not actually cyclical, as the scoping behaves as if the @context definition was inline in the instance data.

Expected Behavior:

The scoped contexts should be processed without the Cyclical error.

Test Data:

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

No branches or pull requests

1 participant