GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Incorrect conversion to relative IRIs with @base in framing · Issue #220 · jsonld-java/jsonld-java

Incorrect conversion to relative IRIs with @base in framing #220

New issue
Copy link
New issue
Copy link
Open
Open
Incorrect conversion to relative IRIs with @base in framing#220
Copy link
Assignees
dr0i

Description

@jindrichmynarz
jindrichmynarz
opened on Jan 15, 2018
Issue body actions

When @base and a prefix declaration have a common domain, JSON-LD framing converts the prefix declaration into an incorrect relative IRI. For example:

[
  {
    "https://example.com/ontology/a#bar": [
      {
        "@value": "foo"
      }
    ]
  }
]

And a frame:

{
  "@context": {
    "@base": "https://example.com/resource/a/",
    "ex": "https://example.com/ontology/a#"
  }
}

Produce:

{
  "@context": {
    "@base": "https://example.com/resource/a/",
    "ex": "../../../ontology/a"
  },
  "@graph": [
    {
      "@id": "_:b0",
      "ex:bar": "foo"
    }
  ]
}

Note that the ex prefix points to a relative IRI with the hash dropped, so that the original property https://example.com/ontology/a#bar becomes https://example.com/ontology/abar.

When the same data and frame are used in the JSON-LD Playground, the hash is preserved, with the following output:

{
  "@context": {
    "@base": "https://example.com/resource/a/",
    "ex": "https://example.com/ontology/a#"
  },
  "@graph": [
    {
      "@id": "_:b0",
      "ex:bar": "foo"
    }
  ]
}

Activity

  1. dr0i
    self-assigned this
    on Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dr0i
    dr0i

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.