- From: Julian Everett <julianjeverett@yahoo.com>
- Date: Tue, 12 Aug 2014 16:47:58 -0700
- To: Markus Lanthaler <markus.lanthaler@gmx.net>, "public-linked-json@w3.org" <public-linked-json@w3.org>
- Cc: 'Dave Longley' <dlongley@digitalbazaar.com>
- Message-ID: <1407887278.26120.YahooMailNeo@web164904.mail.bf1.yahoo.com>
OK, my tests are green (the phantomjs timeout should be upped if they start flickering) - the fork is here https://github.com/datalanguage/jsonld.js for anyone interested. cheers Julian ________________________________ From: Julian Everett <julianjeverett@yahoo.com> To: Markus Lanthaler <markus.lanthaler@gmx.net>; "public-linked-json@w3.org" <public-linked-json@w3.org> Cc: 'Dave Longley' <dlongley@digitalbazaar.com> Sent: Tuesday, August 12, 2014 3:42 PM Subject: Re: Framing by reference/value So I think I now have a working version of the Javascript library with the required behaviour (I'm still adding tests for indirect circular references via sets, etc - but so far all are passing). Before I continue, I just wanted to check my logic with you against the framing algorithm http://json-ld.org/spec/latest/json-ld-framing/#framing-algorithm What I have done is to remove the whole of 4.4.4, on the basis that if you can detect a circular reference and block it prior to injecting it then you never need to do a 'Remove Embedded Definition' subsequently. I've then added checks for circular reference injection prior to the recursive calls at 6.2.3.1.1 and 6.2.3.2 The circular reference check works by traversing back up the chain of resource->parent['@id'] links in the 'map of embeds' to ensure that the injected resource is not a direct or indirect ancestor of the current embed target. Any obvious holes in this logic? FYI one thing making feel a bit nervous :-) is that I don't entirely get the point of the embed processor option (although I can see why it makes sense inside a framing context): setting that to false basically means don't frame doesn't it, as the only output will be the set of root resource URIs? thanks Julian ________________________________ From: Markus Lanthaler <markus.lanthaler@gmx.net> To: public-linked-json@w3.org Cc: 'Julian Everett' <julianjeverett@yahoo.com>; 'Dave Longley' <dlongley@digitalbazaar.com> Sent: Monday, August 11, 2014 4:49 PM Subject: RE: Framing by reference/value On Friday, August 08, 2014 5:35 PM, Dave Longley wrote: > On 08/08/2014 06:05 AM, Julian Everett wrote: > >> Is such output achievable via framing please, or do I need to add some > >> kind of post-framing graph denormalisation step? > > There have been a number of discussions regarding "aggressive > embedding" (or embedding by value as you called it). The details > (flags to turn it on/off, dealing with cycles, etc.) haven't been > fully worked out and the feature hasn't been implemented in the > JavaScript library used on the playground. I think Markus may have > implemented something in his PHP processor. Yes, my processor [1] supports this (and a couple of other things). There's a playground at [2] that you can use to try it without having to install anything. The example you posted works exactly as you expected Julian. I have found this to be an extremely useful feature and turned it on by default (even though that means I fail some of the framing tests we have). [1] https://github.com/lanthaler/JsonLD [2] http://www.markus-lanthaler.com/jsonld/playground/ -- Markus Lanthaler @markuslanthaler
Received on Tuesday, 12 August 2014 23:48:27 UTC