- From: Gregg Kellogg <gregg@greggkellogg.net>
- Date: Thu, 13 May 2021 15:26:16 -0700
- To: Victor CHARPENAY <victor.charpenay@emse.fr>
- Cc: W3C JSON-LD Working Group <public-json-ld-wg@w3.org>
- Message-Id: <559E8D40-B92E-4F39-BF7D-B66D595DCFC0@greggkellogg.net>
Victor, this has been captured in https://github.com/w3c/json-ld-api/issues/514 <https://github.com/w3c/json-ld-api/issues/514> and raised as an Erratum but we haven’t determined a fix at this point. The logic for compaction is colliding in the Term Selection algorithm, where it’s come up with a Compact IRI, but it expects an IRI. Thanks for pointing it out, though. Gregg Kellogg gregg@greggkellogg.net > On May 11, 2021, at 10:01 AM, Victor CHARPENAY <victor.charpenay@emse.fr> wrote: > > Dear all, > > while I was fixing a few things on the W3C Thing Description context file [1], I found the behavior of the JSON-LD processor somewhat surprising regarding property-based data indexing (sec. 4.6.1.1 [2]). I'm not sure if it's intentional or not. > > Here is the issue: when I expand the San Francisco Giants example given in the spec, I get an expanded object as expected. But when I attempt to compact it again with the original context, I get the following error: jsonld.SyntaxError: Absolute IRI "schema:jobTitle" confused with prefix "schema". I tried on the JSON-LD playground [3] and with PyLD, for the same result. > > Is there indeed an ambiguity as to URI expansion? > > Thank you, > Victor > > [1] https://github.com/w3c/wot-thing-description/pull/1077 > [2] https://www.w3.org/TR/json-ld11/#property-based-data-indexing > [2] https://json-ld.org/playground/#startTab=tab-compacted&json-ld=%7B%22%40id%22%3A%22http%3A%2F%2Fexample.com%2F%22%2C%22%40type%22%3A%22http%3A%2F%2Fschema.org%2FSportsTeam%22%2C%22http%3A%2F%2Fschema.org%2Fathlete%22%3A%5B%7B%22%40type%22%3A%22http%3A%2F%2Fschema.org%2FPerson%22%2C%22http%3A%2F%2Fschema.org%2FjobTitle%22%3A%22Catcher%22%2C%22http%3A%2F%2Fschema.org%2Fname%22%3A%22Buster%20Posey%22%7D%2C%7B%22%40type%22%3A%22http%3A%2F%2Fschema.org%2FPerson%22%2C%22http%3A%2F%2Fschema.org%2FjobTitle%22%3A%22Starting%20Pitcher%22%2C%22http%3A%2F%2Fschema.org%2Fname%22%3A%22Madison%20Bumgarner%22%7D%5D%2C%22http%3A%2F%2Fschema.org%2Fname%22%3A%22San%20Francisco%20Giants%22%7D&context=%7B%22%40context%22%3A%7B%22%40version%22%3A1.1%2C%22schema%22%3A%22http%3A%2F%2Fschema.org%2F%22%2C%22name%22%3A%22schema%3Aname%22%2C%22body%22%3A%22schema%3AarticleBody%22%2C%22athletes%22%3A%7B%22%40id%22%3A%22schema%3Aathlete%22%2C%22%40container%22%3A%22%40index%22%2C%22%40index%22%3A%22schema%3AjobTitle%22%7D%7D%7D
Received on Thursday, 13 May 2021 22:27:36 UTC