Skip to content

Minimal scoped context affects term selection with index container #394

@gkellogg

Description

@gkellogg

From w3c/wot-thing-description#894

Compacting the following:

{
  "https://www.w3.org/2019/wot/td#hasPropertyAffordance": [
    {
      "http://purl.org/dc/terms/title": "Switch"
    }
  ],
  "http://purl.org/dc/terms/title": "46203"
}

with the following context:

{
  "@context": {
    "td": "https://www.w3.org/2019/wot/td#",
    "dct": "http://purl.org/dc/terms/",
    "properties": {
      "@id": "td:hasPropertyAffordance",
      "@type": "@id",
      "@container": "@index",
      "@context": {}
    },
    "title": "dct:title"
  }
}

prevents "title" from being used in the output:

{
  "@context": {
    "td": "https://www.w3.org/2019/wot/td#",
    "dct": "http://purl.org/dc/terms/",
    "properties": {
      "@id": "td:hasPropertyAffordance",
      "@type": "@id",
      "@container": "@index",
      "@context": {}
    },
    "title": "dct:title"
  },
  "title": "46203",
  "properties": {
    "@none": {
      "dct:title": "Switch"
    }
  }
}

Instead, it uses "dct:title". Removing "@context": {} from the context makes it work and use "title" instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions