Conversation
Expansion step 11 resolves a node's types against the type-scoped context (the active context after the node's embedded context is processed, step 9). No existing fixture exercises the two consequences of that wording: - tc039: a type defined only by the node object's own embedded context activates its type-scoped context. Every current scoped-context fixture defines the type in the initial document context, where an implementation that wrongly resolves types against the initial context is indistinguishable from a conformant one. - tc040: after a property-scoped "@context": null reset, a type-scoped context defined in the outer document context must not activate; the node's own embedded definition of the same type applies instead. This is the JSON-LD shape underlying VC 2.0's verifiableCredential credential isolation. An implementation that resolves types against the initial document context passes the current suite while silently dropping the terms of any type-scoped context introduced by an embedded context. The pattern is common in VC-shaped documents, where the divergence reaches expanded output, N-Quads, and RDFC-1.0 hashes. Expected outputs verified identical across jsonld.js 8.3.3, PyLD 3.3.0, Ruby json-ld 3.3.2, and Titanium JSON-LD 1.4.1 (expand and toRdf).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #719.
Adds two tests as expand + toRdf twins (byte-identical inputs):
c039— Type-scoped context defined in an embedded context. A type defined only by the node object's own embedded@contextactivates its type-scoped context: expansion step 11.2 resolves types against the active context after step 9, not the initial document context.c040— Outer type-scoped context does not survive a property-scoped context null reset. After a property-scoped@context: nullreset, a type-scoped context defined in the outer document context must not activate; the node's own embedded definition of the same type applies. Similar to theverifiableCredentialisolation pattern in the VC Data Model 2.0 context.Expected outputs verified byte-identical across jsonld.js 8.3.3, PyLD 3.3.0, Ruby json-ld 3.3.2, Titanium JSON-LD 1.4.1 and PHP-JSON-LD. Manifest entries added to
expand-manifest.jsonldandtoRdf-manifest.jsonldin series order, matching neighboring entry format; inputs use absolute IRIs only.Contributed under the W3C Patent Policy and Software and Document License.