-
Notifications
You must be signed in to change notification settings - Fork 136
Description
The expansion of terms that are in the scope of a nested context does not seem to take into account definitions from the parent context.
While I'm not familiar enough with the expansion algorithm to know whether that behaviour is correct, it certainly differs from the jsonld.js implementation.
As we are using both libraries in a usecase involving Verifiable Credentials signing, reproducible normalization (and therefore reproducible expansion) across platforms is crucial.
The problem is reproduced here with a minimal document :
https://colab.research.google.com/drive/1QoZ4o8DCNpJshR-c8SbaREKnrMg1VAt0
The same document can be tested in the jsonld playground : https://tinyurl.com/2dfr3w27
where the difference in expansion and normalization can be observed.
The python notebook contains two commented out lines in the nested context that fix the problem, but of course it would be expected that both libraries behave the same way with the same input.