Skip to content

awardedDate context definition uses undefined xsd prefix #646

Description

@ottonomy

awardedDate in the 3.0.3 context is typed as "@type": "xsd:dateTime" — a compact IRI — but the OB context never defines an xsd prefix. Every other datatype in the file is written out in full (https://www.w3.org/2001/XMLSchema#date, #float, #anyURI, #boolean). That means xsd:dateTime resolves to the real XSD IRI depends entirely on whether an earlier context in the credential's @context array happens to define xsd as a prefix; if none does, it expands to a literal IRI with scheme xsd, and you get ^^<xsd:dateTime> in the canonicalized n-quads.

This input:

{
  "@context": ["https://www.w3.org/ns/credentials/v2", "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"],
  "type": "AchievementSubject",
  
  "activityStartDate": "2026-01-23",
  "awardedDate": "2026-08-12"
}

Produces these NQuads:

_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://purl.imsglobal.org/spec/vc/ob/vocab.html#AchievementSubject> .
_:b0 <https://purl.imsglobal.org/spec/vc/ob/vocab.html#activityStartDate> "2026-01-23"^^<https://www.w3.org/2001/XMLSchema#date> .
_:b0 <https://purl.imsglobal.org/spec/vc/ob/vocab.html#awardedDate> "2026-08-12"^^<xsd:dateTime> .

Playground link. "2026-08-12"^^<xsd:dateTime> .

If for some reason a prior context defined xsd then the IRI in the NQuads would be different. We wouldn't want it to be possible for the IRIs of our terms to change, so this term should be explicitly defined like the other data types.

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