Code Monkey home page Code Monkey logo

Comments (6)

azaroth42 avatar azaroth42 commented on June 20, 2024

πŸ‘ to the use case. Have you tried implementing a solution to this, @gkellogg ?

from json-ld-framing.

gkellogg avatar gkellogg commented on June 20, 2024

I generally implement things before considering a specification update, and I'll take a look, in due course. (Unless, of course @dlongley or @davidlehn beat me to it!).

from json-ld-framing.

azaroth42 avatar azaroth42 commented on June 20, 2024

Resolution on the WG call of 2018-09-14 was to accept this issue as valid and valuable, and to seek additional implementation experience for potential solutions.

from json-ld-framing.

gkellogg avatar gkellogg commented on June 20, 2024

So, this ends up running afoul of the general framing algorithm. When framing a property with a node value, it looks for a frame associated with the property, if there is none, it constructs one using @embed, @explicit and @requireAll:

From Framing 4.4.2.3.2:

... If frame does not exist, create a new frame using a new dictionary with properties for @embed, @explicit and @requireAll taken from embed, explicit and requireAll.

The requested logic would require us to construct a new frame based on properties of the existing frame, which could have wide implications.

The best we can do without radical changes would be to make the sub-frames explicit (playground):

{ 
  "@context" : {
    "@vocab" : "http://purl.bdrc.io/ontology/core/",
    "taxSubclassOf" : {
      "@id" : "http://purl.bdrc.io/ontology/core/taxSubclassOf",
      "@type" : "@id"
    },
    "bdr" : "http://purl.bdrc.io/resource/",
    "children": { "@reverse": "http://purl.bdrc.io/ontology/core/taxSubclassOf" }
  },
  "@id" : "bdr:O9TAXTBRC201605",
  "children": {
    "children": {
      "children": {}
    }
  }
}

This generates the following, with backwards and forwards links:

{
  "@context" : {
    "@vocab" : "http://purl.bdrc.io/ontology/core/",
    "taxSubclassOf" : {
      "@id" : "http://purl.bdrc.io/ontology/core/taxSubclassOf",
      "@type" : "@id"
    },
    "bdr" : "http://purl.bdrc.io/resource/",
    "children": { "@reverse": "http://purl.bdrc.io/ontology/core/taxSubclassOf" }
  },
  "@id" : "bdr:O9TAXTBRC201605",
  "children": [{
    "@id": "bdr:O9TAXTBRC201605_0001",
    "@type": "Taxonomy",
    "taxSubclassOf": "bdr:O9TAXTBRC201605",
    "children": {
      "@id": "bdr:O9TAXTBRC201605_0002",
      "@type": "Taxonomy",
      "taxSubclassOf": "bdr:O9TAXTBRC201605_0001"
    }
  }, {
    "@id": "bdr:O9TAXTBRC201605_0010",
    "@type": "Taxonomy",
    "taxSubclassOf": "bdr:O9TAXTBRC201605"
  }]
}

(Note that unused repetitions of "children" are ignored if there are no children).

This seems like an acceptable solution to me requiring no change.

from json-ld-framing.

iherman avatar iherman commented on June 20, 2024

This issue was discussed in a meeting.

  • RESOLVED: Add a note to the framing spec about the asymmetry, and longer explanation with examples in the primer document for issue framing#5 on @reverse recursion
View the transcript 3.1. Infinite @reverse framing recursion (Gregg’s findings)
Rob Sanderson: link: #5
Gregg Kellogg: raises question about framing design criteria
… if there is no frame to be matched, algo constructs one
… so if you have something that infinitely recurses on @reverse, would mean a change to algo
Gregg Kellogg: #5 (comment)
Gregg Kellogg: solution suggested in my latest comment is to use frame as really intended
… you would create necessary children finitely
Rob Sanderson: does this mean it works any differently for @reverse?
Gregg Kellogg: not really. In the absence of a property in the reverse it would create it.
Rob Sanderson: so if wanted to be explicit in the non-reverse direction you would just ???
Gregg Kellogg: no change, but describe behavior / example in primer
Rob Sanderson: questions?
Rob Sanderson: s/???/include them explicitly in the frame, the same as for @reverse/
Rob Sanderson: if not, how do we want to resolve? example in spec or note in primer?
Benjamin Young: willing to take a crack at what should go into primer
Adam Soroka: agree
Rob Sanderson: a note in the spec and then a longer discussion in primer?
Proposed resolution: Add a note to the framing spec about the asymmetry, and longer explanation with examples in the primer document for issue framing#5 on @reverse recursion (Rob Sanderson)
Gregg Kellogg: +1
Rob Sanderson: +1
Benjamin Young: +1
Ivan Herman: +1
Tim Cole: +1
Adam Soroka: +1
Simon Steyskal: +1
Jeff Mixter: +1
Rob Sanderson: +1
Benjamin Young: +1
Resolution #2: Add a note to the framing spec about the asymmetry, and longer explanation with examples in the primer document for issue framing#5 on @reverse recursion

from json-ld-framing.

azaroth42 avatar azaroth42 commented on June 20, 2024

Moved to Editorial given Resolution above.

from json-ld-framing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.