Skip to content

SPDX could use a flat (not per-module) namespace #1165

Description

@VladimirAlexiev

(Split off from #1146 because this issue is more controversial)

IMHO it's better to use a single flat namespace rather than sub-namespaces per topic/module. Arguments:

  • SPDX is not such a huge ontology (YET) to require splitting into sub-namespaces
  • Fewer namespaces make it easier for users
  • A single namespace makes development and maintenance easier: if a term needs to move to another module, no change is needed
  • A single namespace makes it more stable: for the same reason as previous item
  • If JSONLD uses flat (non-prefixed) keys, that means there are no key conflicts, so a single namespace is feasible
    • UPD: I now checked in https://spdx.github.io/spdx-spec/v3.0.1/rdf/spdx-context.jsonld and it seems only Core terms are plain words; per-module terms use prefixes eg ai_hyperparameter, dataset_datasetAvailability
    • In some cases this creates a duplicate word (eg dataset_datasetAvailability)
    • But it is a counter-indication against the change requested by this issue.

Examples:

  • schema.org has 850 classes and 1500 props and uses a single namespace
  • electrical CIM has 900 classes and 5500 props and uses 3 namespaces: cim, nc, eu (the latter two are EU/ENTSO-E CIM extensions)

Counter-examples:

  • FIBO's 2022Q2 release consisted of 290 ontologies and used 380 prefixes (including external prefixes). I think that''s justified since it's very large. (I haven't counted classes and props; Gemini tells me 200 ontologies, 1750 classes, 750 props but I think that's a significant under-counting)
  • AAS uses hierarchical namespaces for its meta-model (which is pretty small), which has been criticized by the community: Properties in RDF are prefixed by class names admin-shell-io/aas-specs-metamodel#43.

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

    RDF/OWL/SHACLRDF graph, schema, ontology, constraint

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions