W3C home > Mailing lists > Public > public-rdf-comments@w3.org > January 2018

IRI Compaction creates unintended compact IRIs

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Tue, 23 Jan 2018 11:32:48 -0800
Message-Id: <029F7A22-3144-4387-A46E-DCD57638583D@greggkellogg.net>
To: public-rdf-comments Comments <public-rdf-comments@w3.org>
As described in https://github.com/json-ld/json-ld.org/pull/511#issuecomment-313263440, the mechanism used for constructing compact IRIs from terms considers terms that are not intended to be used for prefixes. For example, if a context defines “schema”: “http://schema.org”, and the term “sport”: {“@id”: “schema:sport”, “@type”: “@id”}, when compacting the IRI http://schema.org/sportsEvent, it will generate “sport:sEvent”. There are numerous similar examples.

This is fixed in the CG version in https://github.com/json-ld/json-ld.org/pull/511; when compacting documents in legacy mode, only simple terms (not having a complex term definitions) ending in a delimiter are considered for constructing compact IRIs. For new usage, when version is set appropriately, this can be further modified by adding a @prefix entry in a term definition.

Gregg Kellogg
gregg@greggkellogg.net
Received on Tuesday, 23 January 2018 19:33:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 23 January 2018 19:33:13 UTC