Skip to content

DPROD Contracts: SHACL shape validating dprod:path value structure (2.3) #196

@jgeluk

Description

@jgeluk

Track: DPROD 1.1 data-contracts post-merge follow-up.

Plan item 2.3 of dprod-contracts/docs/changes-plan.md (source: Matthias email 19d08a1d item #10). dprod:path is "either a single property IRI or an RDF list of property IRIs". Today only cardinality is enforced (LeftOperandShape in dprod-contracts-shapes.ttl). A malformed value (e.g. a literal) silently breaks evaluation rather than producing a SHACL violation.

Steps:

  1. Extend the sh:path dprod:path property shape inside LeftOperandShape with sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node dprod-shapes:RdfListOfIris ] ).
  2. Add a new SHACL-Core shape dprod-shapes:RdfListOfIris that walks rdf:rest*/rdf:first and asserts each element is sh:nodeKind sh:IRI:
    sh:property [ sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; sh:nodeKind sh:IRI ] .

Verify: a LeftOperand whose dprod:path is a literal triggers a violation; existing examples in dprod-contracts/examples/ still validate.

Note: mechanical if kept SHACL-Core. Soft-couples with #186 (5.4) only if that decision changes how dprod:path is OWL-typed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    shapesSHACL shapes and validation

    Type

    No type
    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