Skip to content

Suggested link target improvement in Context Processing #371

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

Closed
kasei opened this issue Feb 14, 2020 · 10 comments
Closed

Suggested link target improvement in Context Processing #371

kasei opened this issue Feb 14, 2020 · 10 comments

Comments

@kasei
Copy link
Contributor

kasei commented Feb 14, 2020

(Related to #265, #356)

The link in Context Processing step 5.1.2 "base IRI" should link to the active context definition.

@gkellogg
Copy link
Member

There is no specific definition for active context base IRI field, as there is for original base URL. This is also true for vocabulary mapping, default language, and default base direction. The next of 5.1.2 makes clear that this is for that field in the active context.

I don't think it wise or necessary to add separate definitions for fields of such data structures. An alternate way would have been to define WebIDL structures for active context and term definition which does allow for structure-specific addressing, but we decided to not go there for these relatively few internal structures.

@kasei
Copy link
Contributor Author

kasei commented Feb 15, 2020

Maybe I'm misunderstanding. (The grammatical structure of 5.1.2 is very confusing.) Is the base IRI being updated in 5.1.2 not the same as "the current base IRI (IRI)" defined as being part of an active context?

@gkellogg
Copy link
Member

We initialize a new active context and set base IRI and original base IRI fields to the value of original base IRI in the existing active context. (Along with previous context).

previousResult = result
result = ActiveContext.new
if !_propagate_
  result.previousContext = previousResult
result.baseIRI = activeContext.originalBaseUrl
result.originalBaseUrl = activeContext.originalBaseUrl

@kasei
Copy link
Contributor Author

kasei commented Feb 15, 2020

Right. So I'd suggest improving the language to not have those two assignments directly follow a conditional clause without any punctuation.

But beyond that, Isn't result.baseIRI in your code a reference to "the current base IRI" defined in section 4.1 (immediately preceding the definition for the original base URL)?

@gkellogg
Copy link
Member

I'll reorder the clauses in the sentence to make it clear that the conditional only applies to previous context.

In the pseudo-code, and in the algorithm, result has been set to a new active context, so base URI, refers to the base URI associated with that active context. As mentioned above, there is no specific definition for that field within a base context, other than what is described in 4.1. IMO, it's clear in this context what is meant when we say we're initializing a new active context and setting some values within that active context.

@gkellogg
Copy link
Member

Updated in #377.

@kasei
Copy link
Contributor Author

kasei commented Feb 15, 2020

there is no specific definition for that field within a base context, other than what is described in 4.1.

I'm not asking for anything beyond a link to 4.1. But currently "original base URL" links to 4.1 while "base IRI" links to RDF 1.1 Concepts and Abstract Syntax. Since the item "the current base IRI" in 4.1 also links to RDF 1.1 Concepts and Abstract Syntax, I'm asking why step 5.1.2 links directly to RDF 1.1 Concepts and Abstract Syntax instead of to 4.1.

(I'm also not sure what "base context" refers to here.)

@gkellogg
Copy link
Member

On advice, we limited local definitions of terms to those that are truly JSON-LD-specific terms, and refer to the defining specs when using terms that are originally defined elsewhere. This is the case for base IRI.

In this case, maybe it would be best to change the field in active context to base URL to not confuse it. It would probably be better for both this, and original base URL to not be exported as outside referencable terms.

gkellogg added a commit that referenced this issue Feb 15, 2020
@gkellogg
Copy link
Member

Stuck with the name base IRI, but it is now a definition with the fragment identifier context-base-iri.

gkellogg added a commit that referenced this issue Feb 16, 2020
@gkellogg
Copy link
Member

Updated in #377.

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

No branches or pull requests

2 participants