Re: property indexing and nested props?

I don’t see a way to do what you want; perhaps with framing. But, if you add “@type”: “@id” to the “prefix” term definition, it get’s a bit better:

{
  "@context": {
    "@vocab": "http://example.org/",
    "ex": "http://example.org/",
    "rdfs": {"@type": "@id"},
    "xsd": {"@type": "@id"},
    "prefixes" : {
      "@type": "@id",
      "@container": "@index",
      "@index": "ex:pfx"
    }
  }
}

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

rdfs: <http://example.org/pfx> "rdfs" .

xsd: <http://example.org/pfx> "xsd" .

 [<http://example.org/prefixes> rdfs:,
      xsd:] .
You might need some SPARQL involved.

It’s useful to reduce input the the expanded form, as all this indexing stuff is really just syntactic sugar.

[
  {
    "http://example.org/prefixes": [
      {
        "@id": "http://www.w3.org/2000/01/rdf-schema#",
        "http://example.org/pfx": [
          {
            "@value": "rdfs"
          }
        ]
      },
      {
        "@id": "http://www.w3.org/2001/XMLSchema#",
        "http://example.org/pfx": [
          {
            "@value": "xsd"
          }
        ]
      }
    ]
  }
]


Gregg Kellogg
gregg@greggkellogg.net

> On Feb 17, 2020, at 5:49 AM, Vladimir Alexiev <vladimir.alexiev@ontotext.com> wrote:
> 
> I get the same  error "invalid value object: Attempt to add illegal key to value object: ex:pfx" with this context:
> 
>   {
>   "@context": {
>     "@vocab": "http://example.org/ <http://example.org/>",
>     "ex": "http://example.org/ <http://example.org/>",
>     "prefixes" : {
>       "@container": "@index",
>       "@index": "ex:pfx"
>     },
>     "ex:pfx": {
>       "@container": "@index",
>       "@index": "ex:iri"
>     }
>   }
> }

Received on Monday, 17 February 2020 18:32:08 UTC