Skip to content

Expansion Section 5.2.1, step 7: need clarification #641

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
daenney opened this issue Feb 28, 2025 · 2 comments
Closed

Expansion Section 5.2.1, step 7: need clarification #641

daenney opened this issue Feb 28, 2025 · 2 comments

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.

@w3cbot
Copy link

w3cbot commented Apr 9, 2025

This was discussed during the #json-ld meeting on 09 April 2025.

View the transcript

w3c/json-ld-api#641

<gb> Issue 641 Expansion Section 5.2.1, step 7: need clarification (by daenney) [propose closing]

bigbluehat: mostly, I'm just happy with the engagement. But it does highlight "tree-based" thinking leaking into interpreting JSON-LD

gkellogg: thoughts on this one?

bigbluehat: Related to the Jelly folk contributions, we should also try to get ActivityPub folks involed.
… Many commenters have done their homework, which is great.
… It's good to have an engaged audience.

<anatoly-scherbakov> Discussion about visualizing stuff: https://github.com/orgs/json-ld/discussions/857

<gb> Issue 857 not found

gkellogg: any closing issues? or shall we close?
… k. we'll adjourn for the next couple weeks
… please send in topics!

Next meeting in two weeks.

please engage on https://github.com/orgs/json-ld/discussions/857

<niklasl> Just a mention, I'm closer to make a PR on w3c/json-ld-api#558

<gb> Issue 558 Compaction cannot round-trip terms using `@container: @list` and `@type: @vocab` (by niklasl) [spec:enhancement] [spec:substantive] [ErratumRaised] [class-3]

gkellogg: k. let's adjourn then


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