Skip to content

Expansion Section 5.2.1, step 7: need clarification #641

@daenney

Description

@daenney

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions