-
Notifications
You must be signed in to change notification settings - Fork 23
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
Compact IRI expansion support for non-trivial prefix term definitions #191
Comments
It seems to me that your proposal aims at breaking the principle of URI opacity. More precisely, what you are trying to say is "any IRI starting with |
This is a relevant concern and I have thought about it, but I don't think it is clear-cut. Also it definitely is not the aim even if it might be a consequence. Thoughts:
Also, the opacity principle is most concerned with resource identifying IRI's, which brings us to...
So I'm not concerned about breaking IRI opacity per-se. This avenue gets quite philosophical quite fast though and I'm sure there has been discussions. Are these written down anywhere? |
I disagree that the URI/IRI opacity argument is limited to example 1. Both example imply that anybody can coin a new IRI with a given prefix ( I also believe that the opacity-violation is indeed related to the |
Granted. But this kind of format-specific knowledge could not (easily) be conveyed in RDF nor JSON-LD, since their data model consider IRIs as opaque identifiers. |
I may be a bit confused on a more philosophical level here; why would others need to guess that the IRI denotes a section or a relation? From the point of RDF model whether an IRI is a section or relation is irrelevant as the ordering in this case is only very contextually relevant, and those who are in that context don't need to guess, they know. Additionally, if actual triple graphs are emitted from a format like this, it is straightforward for the specification to require that appropriate type triples are emitted for the targeted objects of above predicates. In fact I fully intend to require that. Triple inference is a thing, and contextual semantics are a thing. If I understand you correctly, you're raising the point that RDF has the noble goal of trying to be 'self-contained' - all knowledge has a triple correspondence and must be expressed as such. I recognize this is tremendously powerful and useful, but is also what makes RDF so damn clunky and heavy, and probably the reason that is slowing its adoption. For me JSON-LD appeared to be the solution for this clunkiness, in that it is the tool that allows triples graphs to emitted and inferred from essentially contextual, efficient structures with overheads removed (both in terms of character count as well as in unnecessary indirections). |
As an addendum: I would also be looking for a way to specify that node dict key "s:foo#bar" would also imply "s:foo#bar a s:foo"; whether explicitly, structurally via JSON-LD @context, or via the specification itself. |
I did a bit of analysis to help myself conseptualize the process more clearly, as I wanted to find an answer to the question "Do I want to 'cook'?" and to also understand 'domain-specific graphs' and their 'universalization' a bit better. I'm dumping this here in case someone is interested, some questions at the end. 1. The information processes as seen by a product owner operating in some domainConsider the following three processes, ordered by their business relevance, and where domain refers to all code and operators who conform and make use of domain specifications:
Formats in caps, operations in arrows, optionals in parens, consumer at the end.
1.1.
|
To attempt to summarize from my understanding, the request is to allow per prefix defaults to be set, such as for |
Right, although I maybe wouldn't use 'dc' as an example as I imagine that surely would break existing things... |
This is out of scope for the WG to add triples to the graph via the context. |
Thanks; reasonable enough. Indeed in the big picture not a problem, as I've been prepared to do the 'universalization' step anyway. As long as the triples that the @context does emit are not conflicting/ambiguous. |
This was discussed on the WG call of 2019-06-07, and the decision was that this is not a bug but a new feature request. As such, the closing date for new features was two weeks (see https://www.w3.org/blog/2019/03/json-ld-collaborative-work-and-feature-timeline/) after the working draft of May 10 ( https://www.w3.org/TR/json-ld11/ ) and thus May 24th. This could be discussed in the JSON-LD community group towards a solution for a future version, and we will keep it in mind for inclusion if it solves bugs that come up within the 1.1 timeframe. Many thanks for the detailed discussion! |
This issue was discussed in a meeting.
View the transcriptIRI expansionRob Sanderson: ref: #191 Rob Sanderson: essentially, what I took away from this issue is that what is wanted is a way to set defaults per prefix … e.g., everything with x prefix, everything is a list … since we declare intent to close to new features (after last published draft) … so, can we defer this? … or is it a bug we have to address Benjamin Young: the use of this seems to want ad hoc terms mixed in with the prefix declaration … the first example seems that way … seems he could get same result with slightly more verbose (less confusing) instance Adam Soroka: this reminds me of java server tags … not clear that this is something json-ld was supposed to do. … this seems to be about complex structures, almost transformative … this is not the focus of json-ld. important to do, but not really our intent here Ivan Herman: so what I understood from the issue is that this is not a bug, but really is a new feature … so the answer should simply be that we defer because of the feature freeze and avoid discussing the details Adam Soroka: should we send to CG Ivan Herman: since we are not closing issue, we don’t need to send to CG … the person submitting may want to do so. Proposed resolution: Defer syntax#191 and api#94 as new features after feature freeze (Rob Sanderson) David Newbury: +1 Rob Sanderson: will do same for issue in api Ruben Taelman: +1 Benjamin Young: +1 Rob Sanderson: +1 Tim Cole: +1 Ivan Herman: +1 Adam Soroka: +1 Pierre-Antoine Champin: +1 Resolution #4: Defer syntax#191 and api#94 as new features after feature freeze Action #3: post blog reference for feature freeze (Rob Sanderson) Ivan Herman: please add to issue link to blog where we declared feature freeze Rob Sanderson: can we add mention of feature freeze in repos readme Action #4: add feature freeze note to the syntax, api, and framing READMEs and issue template for bugs only (Benjamin Young) |
Appreciated. I got useful feedback on the philosophy and direction of JSON-LD, this was mostly what I was looking for anyway. I'm in no rush... not yet at least. |
This enhancement proposal presents two use cases which suggest extending term definition semantics to also prefix-expanded terms.
As it is now the term definition semantics only apply during expansion to node dictionary keys which are exact matches to an extended term definition. Only the "@id" member is semantically meaningful when a term is used as a prefix.
A limited form of this proposal specific to "@container": "@list" can be found on the json-ld-api github
This enhancement is not targeted at 1.1 and as such does not make final syntactic proposals but focuses on describing the use cases for consideration. If the proposal is considered essentially sane then further experimentation is expected to yield more concrete suggestions.
1. Documentation JSON interchange format
A complex Javascript-based ecosystem exists with many semantically different places where documentation needs to be embedded and cross-referenced. HTML is too cumbersome and format such as Markdown is a convenient solution only in some situations, but requires source-code introspection and is not machine-readable.
A unified JSON interchange format is preferred which satisfies following criteria:
Any two of the criteria are easy to achieve with little effort. Criteria 3 suggests JSON-LD but there are shortcomings.
Let's consider a hypothetical function 'doTheThing' documentation block (with explanatory, self-referential bogus text content):
Criteria 1 is satisfied by relying on two principles: writer only needs to understand section (
s:*
) primitives, and how the fragment is used for relative positioning and section identification.Criteria 2 is satisfied by on one hand
doc.name
anddoc.arguments.some_arg
being intuitive to access and how numbered and bulleted list contents are flat, easily programmatically accessible and emittable arrays.Criteria 3 is achievable by JSON-LD in the general case only if complex suffixes, specifically "@container": "@list" is supported:
As of now the default container type is @set, which loses both ordering and duplicates, both of which are critical. Necessitating the various suffixes to be explicitly declared in the @context loses generality.
A playground example demonstrating the set/list issue. Both "p" and "p:s" should yield list triples, but only "p" does.
There are variations on how to ideally meet the desired criteria. This variant was chosen to demonstrate how a minimal, universal @context combined allows the prefix:suffix to pull a lot of weight, to a point where addition of new doc primitives can be done without touching already deployed @context code in the wild.
2. RDF serialization of 'freeform' named, ordered sequences
Consider an object model with named, unordered, many-to-'any' mappings called 'Properties' and named, ordered many-to-many mappings called 'Relations', where the namespaces of Properties and Relations are disjoint. The names of these mappings are mutable, ad hoc, even application private in nature, so they can't be expected to have ontology definitions. Nevertheless the object model has a need for universal serialization which allows reasoning: a JSON serialization format with RDF correspondence makes sense.
A reasonable JSON serialization of such an object might be:
Similar to case 1, a generic context
would be 'future proof' and allow emitting reasonable and relatively simple RDF triple graphs. Here the need is to have prefix support for "@type": "@id" as well in addition to "@container": "@list", as per the proposal.
The text was updated successfully, but these errors were encountered: