Skip to content

toRdf/0118 fails in JSON-LD 1.1 #205

@gkellogg

Description

@gkellogg

Since we added a provision in Create Term Definition that for simple terms to be used as prefixes, they need to end in a genDelim character, toRdf/0118 does not render the same results.

The relevant part of this test is the following:

{
  "@context": {"term": "_:term", "termId": { "@id": "term", "@type": "@id" }},
  "termId": "term:AppendedToBlankNode"
}

This previously expanded to the following:

[{
  "_:term": [{"@id": "_:termAppendedToBlankNode"}]
}]

Now it generates the following:

[{
  "_:term": [{"@id": "term:AppendedToBlankNode"}]
}]

This is because the new test does not use "term" as a prefix, so it's treated as a scheme.

We could either update the algorithm to allow blank node terms to be used as prefixes, or make this a 1.0-only test. As the general trend for us is to deprecate blank node terms, this might be the way to go. Note that a workaround would be to make it an expanded term definition with @prefix set to true. But, this might affect contexts such as that used by Activity Streams, so the safest thing would be to update 16.6 as follows:

If term contains neither a colon (:) nor a slash (/), simple term is true, and if the IRI mapping of definition ends with a URI gen-delim character, or is a blank node identifier, set the prefix flag in definition to true.

We could add another note about the use of blank node properties as being obsolete.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions