Re: Unexpected behavior regarding property-based indexing

Victor, I’ve updated the issue (https://github.com/w3c/json-ld-api/issues/514 <https://github.com/w3c/json-ld-api/issues/514>) with a proposed Erratum, which includes a PR to update the editor’s draft and test suite. As I mentioned, I have my implementation running at rdf.greggkellogg.net/distiller <http://rdf.greggkellogg.net/distiller> with this fix. Could you please verify that this successfully addresses your issue?

Gregg Kellogg
gregg@greggkellogg.net

> On May 14, 2021, at 7:19 AM, Gregg Kellogg <gregg@greggkellogg.net> wrote:
> 
> I’ll spend more time on this an come up with a recommended erratum to handle it. It might require manipulating some steps in term selection. 
> 
> Gregg Kellogg
> 
> Sent from my iPad
> 
>> On May 14, 2021, at 7:16 AM, Victor CHARPENAY <victor.charpenay@emse.fr> wrote:
>> 
>> 
>> Thanks for the pointer! My question was a preliminary to another, more substantial question about roundtripping. I've commented in the issue thread about it.
>> 
>> Roundtripping had been a blocking point in the Thing Description 1.1 specification for some time, we'll probably have to find a workaround to be able to get to REC status.
>> 
>> Best,
>> Victor
>> 
>> De: "Gregg Kellogg" <gregg@greggkellogg.net>
>> À: "Victor CHARPENAY" <victor.charpenay@emse.fr>
>> Cc: "W3C JSON-LD Working Group" <public-json-ld-wg@w3.org>
>> Envoyé: Vendredi 14 Mai 2021 00:26:16
>> Objet: Re: Unexpected behavior regarding property-based indexing
>> 
>> 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 <mailto:gregg@greggkellogg.net>
>> 
>> On May 11, 2021, at 10:01 AM, Victor CHARPENAY <victor.charpenay@emse.fr <mailto: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 <https://github.com/w3c/wot-thing-description/pull/1077>
>> [2] https://www.w3.org/TR/json-ld11/#property-based-data-indexing <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 <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 Tuesday, 18 May 2021 21:26:56 UTC