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

Expansion Section 5.2.1, step 7: need clarification #641

Open
daenney opened this issue Feb 28, 2025 · 1 comment
Open

Expansion Section 5.2.1, step 7: need clarification #641

daenney opened this issue Feb 28, 2025 · 1 comment

Comments

@daenney
Copy link

daenney commented Feb 28, 2025

I'm working through the expansion algorithm, and I'm stuck on step 7. I don't understand what it wants me to do.

The text of step 7, as of 2025-02-28 (W3C Recommendation 16 July 2020), reads:

If active context has a previous context, the active context is not propagated. If from map is undefined or false, and element does not contain an entry expanding to @value, and element does not consist of a single entry expanding to @id (where entries are IRI expanded, set active context to previous context from active context, as the scope of a term-scoped context does not apply when processing new node objects.

I'm completely lost as to what I'm supposed to do here. Do I even need to do anything, or is this a "what we're about to do" introduction for the next steps? The way I'm reading it, it would seem to require I do something before I move on to step 8.

I've looked at a few other implementations to try and get a sense of what's going on, but they seem different from the spec. Both pyld and jsonld.js take a bunch of additional inputs to expansion, like insideList, insideIndex and typeScopedContext which have gone unmentioned so far. jsonld.net seems a bit closer, but their step 7 in expand seems to align with what's currently step 13.

@gkellogg
Copy link
Member

The step is about managing the active context when there is a previous context. The following clauses limit the applicability of this for value objects and node references. In this case, the active context is set to the previous context, because term-scoped contexts do not have affect after you've descended into the object associated with that term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants