Fix for reassigned term aliases by avillar · Pull Request #2925 · RDFLib/rdflib (original) (raw)
Summary of changes
In JSON-LD, when a term is aliased to one of the NODE_KEYS
(e.g, id
to @id
), but is later reassigned in a child context (e.g., id
to dct:identifier
), rdflib incorrectly keeps the original alias and uses it for the binding (e.g., @id
instead of dct:identifier
).
This commit removes any aliases for a term inherited from parent contexts when that term is bound in the current context.
Checklist
- Checked that there aren't other open pull requests for
the same change. - Checked that all tests and type checking passes.
- Considered granting push permissions to the PR branch,
so maintainers can fix minor issues and keep your PR up to date.