Skip to content

@vocab-coerced values resolve against the document base, so the catalogue example does not round-trip #279

Description

@SimonStier

Bug Report

Describe the Bug

Type: normative

format, action, operator and leftOperand are coerced with "@type": "@vocab", but no @vocab is defined. A bare token that is not also a term therefore expands against whatever base the document is served from.

Expected Behavior

A bare token expands to a term IRI that does not depend on where the document is served, and a document survives expansion and compaction unchanged.

Observed Behavior

Expanding and compacting artifacts/src/main/resources/catalog/example/catalog.json with the official context does not return the input:

format:      "HttpData-PULL"  ->  <base>HttpData-PULL
leftOperand: "spatial"        ->  <base>spatial

The same catalogue served from two URLs yields two different RDF graphs.

odrl-profile.jsonld, imported into the message contexts with @import, defines the operators and actions as terms, which is why use and lteq resolve correctly. It defines no left operands, so every leftOperand value is affected. The examples use spatial, dateTime, partner, constraint1 and constraint2; spatial and dateTime are ODRL left operands missing from the profile.

format has a further consequence: DCAT-AP 3.0.1 requires the controlled vocabularies in its Controlled Vocabularies table to be used, and that table binds dct:format to the EU File Type Named Authority List. A base-relative IRI is never such a concept. The examples also use Catalog, and example:HTTP_PUSH whose prefix is undefined, so it expands to an absolute IRI with scheme example.

Possible Implementation

For ODRL, add the left operands to odrl-profile.jsonld alongside the operators and actions already there. For format, either map it to a DSP-specific term and leave dct:format for the file type, or keep the mapping and use file-type IRIs in the examples, with transport selection staying in the DataAddress endpointType.

An explicit @vocab would also stop values escaping to the document base, though it would give them a DSP-namespace IRI rather than an ODRL or EU one.

Raised in passing on #250.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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