w3c / w3c/json-ld-api

toRDF tli12 test seems inconsistent with the specification

Open
#660 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ErratumRaised spec:bug substantive:class 3
Dominant language
HTML
Stars
106
Forks
40
PR merge metrics
No merged PRs in 30d

Description

tli12 test checks if list elements expanded to IRIs with a bad base.

Input:

{
  "@context": {
    "@base": "http://invalid/<>/",
    "list": {
      "@id": "foo:bar",
      "@container": "@list",
      "@type": "@id"
    }
  },
  "list": ["test"]
}

Output:

_:b0 <foo:bar> _:b1 .
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

Note that http://invalid/<>/ is not a valid IRI.

The context processing specification states that:
5.7.3) Otherwise, if value is an IRI, the base IRI of result is set to value.
5.7.5) Otherwise, an invalid base IRI error has been detected and processing is aborted.

Hence, it seems to me that parsing should fail with an invalid base IRI error instead of returning the expected RDF triples.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tli12 test and the supplied @base value, then compare its behavior with context-processing steps 5.7.3 and 5.7.5 in the JSON-LD API specification. Determine whether the test or implementation matches the invalid-base-IRI requirement, then run the relevant toRDF tests and confirm the expected failure or RDF output.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
documentation, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.