Skip to content
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

Possible mistake in Context Processing Algorithm #518

Open
timothee-haudebourg opened this issue Dec 19, 2020 · 5 comments
Open

Possible mistake in Context Processing Algorithm #518

timothee-haudebourg opened this issue Dec 19, 2020 · 5 comments

Comments

@timothee-haudebourg
Copy link

Hi,

Step 5.5.1 of the Context Processing Algorithm says:

If override protected is false and active context contains any protected term definitions, an invalid context nullification has been detected and processing is aborted.

The verification is done on active context (the input context of the algorithm) and not result (the context being built). as far as I understand, this means that the following context, given in compact#tpr01 should be accepted:

{
  "@context": [
    {
      "@vocab": "http://example.com/",
      "@version": 1.1,
      "protected": {"@protected": true}
    },
    null
  ]
}

...but it is not. An invalid context nullification is expected to be returned. So my conclusion is that in Step 5.5.1 of the processing algorithm, result must be used to check the presence of protected term definitions, and not the original active context. Is that correct?

@gkellogg
Copy link
Member

(I believe 5.1.1 is the step you meant).

I think 5.1.1 should check result instead of active context, so the paragraph could read as follows:

| If override protected is false and result contains any protected term definitions, an invalid context nullification has been detected and processing is aborted.

cc/ @dlongley @pchampin

@gkellogg
Copy link
Member

@iherman Should this be marked as Editorial, given our general policy about tests winning out over algorithm text?

@dlongley
Copy link
Contributor

I imagine the next step (5.1.2) may need to talk about setting result back to an initial active context instead of saying it's being initialized as well. I do think it's clearly a typo/editorial.

@iherman
Copy link
Member

iherman commented Dec 20, 2020

@iherman Should this be marked as Editorial, given our general policy about tests winning out over algorithm text?

I do not think so. If my understanding is correct, the normative description of the algorithm changes, which may, potentially, affect other implementations (even though the change is not far-reaching).

@gkellogg
Copy link
Member

Summary:

Update the Context Processing Algorithm steps 5.1.1 and 5.1.2 to look for protected term definitions in result not active context and to initialize result to an initial active context as follows:

5.1.1) If override protected is false and result contains any protected term definitions, an invalid context nullification has been detected and processing is aborted.
5.1.2) Set result as a new initial active context as defined above, and setting both base IRI and original base URL to the value of original base URL in active context, and, if propagate is false, previous context in result to the previous value of result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Errata
Development

No branches or pull requests

4 participants