From 468a0b360b50f0de21f0262c7b41b09d611a3efe Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Thu, 30 May 2019 18:20:18 +0200 Subject: [PATCH 1/4] Protected terms can be redefined, if identical --- index.html | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 106 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 1547a876..1f7a085f 100644 --- a/index.html +++ b/index.html @@ -3666,14 +3666,115 @@

Using the Document Base for the Default Vocabulary

While protected terms can in general not be overridden, - there is an exception to this rule: - a property-scoped context is not affected by protection, - and can therefore override protected terms, + there are two exceptions to this rule. + The first exception is that a context is allowed to redefine a protected term + if the new definition is identical to the protected term definition + (modulo the @protected flag). + The rationale is that the new definition does not violate the protection, + as it does not change the semantics of the protected term. + This is useful for widespread term definitions, + such as e.g. aliasing @type to type, + which may occur (including in a protected form) in several contexts. +

+ + + +

The second exception is that a property-scoped context + is not affected by protection, and can therefore override protected terms, either with a new term definition, or by clearing the context with "@context": null.

-

- The rationale is that "plain JSON" implementations, +

The rationale is that "plain JSON" implementations, relying on a given specification, will only traverse properties defined by that specification. Scoped contexts belonging to the specified properties are part of the specification, From 0b199c6efeff88d41f4464dea2fbfa9ffec9b52c Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Sun, 2 Jun 2019 18:39:52 +0200 Subject: [PATCH 2/4] added entry in the 'changes' section for protected terms --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1f7a085f..60c4c1ab 100644 --- a/index.html +++ b/index.html @@ -12830,7 +12830,9 @@

Changes since JSON-LD Community Group Final Report

This allows a mechanism for documenting the content of a context using HTML.
  • A frame may also be located within an HTML document, identified using type application/ld+json;profile=http://www.w3.org/ns/json-ld#frame.
  • - +
  • Term definitions can now be protected, + to limit the ability of other contexts to override them.
  • +
    Date: Mon, 10 Jun 2019 18:26:25 -0400 Subject: [PATCH 3/4] Apply suggestions from code review Co-Authored-By: David I. Lehn --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 60c4c1ab..dfbf7893 100644 --- a/index.html +++ b/index.html @@ -3673,7 +3673,7 @@

    Using the Document Base for the Default Vocabulary

    The rationale is that the new definition does not violate the protection, as it does not change the semantics of the protected term. This is useful for widespread term definitions, - such as e.g. aliasing @type to type, + such as aliasing @type to type, which may occur (including in a protected form) in several contexts.

    @@ -3704,7 +3704,7 @@

    Using the Document Base for the Default Vocabulary

    { ****"id": "@id", "type": "@type",**** - ####­– Those "redefinition" do not raise an error. + ####­– Those "redefinitions" do not raise an error. ­– Note however that the terms are still protected #### "Person": "http://schema.org/Person", "name": "http://schema.org/name" @@ -12832,7 +12832,7 @@

    Changes since JSON-LD Community Group Final Report

    using type application/ld+json;profile=http://www.w3.org/ns/json-ld#frame.
  • Term definitions can now be protected, to limit the ability of other contexts to override them.
  • - +
    Date: Mon, 10 Jun 2019 15:27:48 -0700 Subject: [PATCH 4/4] Apply suggestion from @davidlehn. --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index dfbf7893..e06efc08 100644 --- a/index.html +++ b/index.html @@ -3678,7 +3678,7 @@

    Using the Document Base for the Default Vocabulary