Skip to content

CRITICAL: Missing rdf: namespace prefix definition in context.jsonld #13

Description

@melvincarvalho

Severity: CRITICAL

Problem

The vocabulary files use rdf:type and rdf:Property throughout, but the rdf: namespace prefix is not defined in context.jsonld.

Affected files:

  • vocab.json - Uses rdf:type, rdf:Property
  • vocab.jsonld - Uses rdf:type, rdf:Property
  • context.jsonld - Missing the rdf: prefix definition

Current State

context.jsonld defines:

{
  "@context": {
    "dc": "http://purl.org/dc/elements/1.1/",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "owl": "http://www.w3.org/2002/07/owl#",
    "xsd": "http://www.w3.org/2001/XMLSchema#",
    "terms": "http://www.w3.org/2003/06/sw-vocab-status/ns#",
    "nostr": "https://w3id.org/nostr#"
  }
}

But rdf: is missing.

Impact

  • JSON-LD processors cannot resolve rdf:type or rdf:Property IRIs
  • Parsing will fail or produce incorrect results
  • Schema is unusable with standard RDF tools
  • Breaks Linked Data compatibility

Fix

Add the RDF namespace to context.jsonld:

{
  "@context": {
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "dc": "http://purl.org/dc/elements/1.1/",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "owl": "http://www.w3.org/2002/07/owl#",
    "xsd": "http://www.w3.org/2001/XMLSchema#",
    "terms": "http://www.w3.org/2003/06/sw-vocab-status/ns#",
    "nostr": "https://w3id.org/nostr#"
  }
}

Verification

After fixing, test with:

jsonld format vocab.jsonld --context context.jsonld

Or use an online JSON-LD playground to validate.

Priority

BLOCKER - Must be fixed before any production use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions