uncefact / spec-jsonld

Exposing the UN/CEFACT vocabulary as web semantics
https://service.unece.org/trade/uncefact/vocabulary/uncefact/
13 stars 5 forks source link

json ld validation errors #197

Open seewodg opened 2 weeks ago

seewodg commented 2 weeks ago

@onthebreeze I noted some validation errors in the untp-core JSON LD:

When I validate the JSON LD at: schema.org json validator

I get some errors for: https://jargon.sh/user/unece/untp-core/v/working/artefacts/jsonld/render.jsonld.

It appears the issue is a lack of @type in relation to schema:rangeIncludes and schema:domainIncludes.

onthebreeze commented 2 weeks ago

@colugo - one more for you.

seewodg commented 2 weeks ago

@onthebreeze Within untp-core, the following class declaration is repeated across a number if "identifiers":

{
  "@id": "untp-core:Standard",
  "@type": "rdfs:Class",
  "rdfs:label": "Standard",
  "schema:source": {
    "@id": "https://test.uncefact.org/vocabulary/untp/core/Standard"
  },
  "rdfs:subClassOf": "untp-core:StandardID",
  "rdfs:comment": "A standard (eg ISO 14000) that specifies the criteria for conformance."
}

Thus the declaration is that a untp-core:Standard is a subclass of untp-core:StandardID, and that doesn't make sense to me.

While an instance of a untp-core:StandardID may classified independently of a untp-core:Standard instance, why would an identifier for a standard be the parent of the standard within a classification system?

In the real world a "standard" encapsulates multiple concepts but it isn't in itself encapsulated by an "Identifier" concept, albeit it may have a "property" or "attribute" that is an identifier. Regarding "Standard" and "Identifier" I don't believe parent/child inheritance applies but instead and identifier is an object property (link) or a datatype property (attribute) of a standard (in this one example from untp-core).

In case I'm missing something here, what is the rationale for making untp-core:StandardID a parent class for untp-core:Standard?

seewodg commented 2 weeks ago

@onthebreeze While we are onto identifiers, untp-core:Identifier seems like it should be a parent class for untp:FacilityID. Currently untp-core:FacilityID is defined in the json ld as:

{
  "@id": "untp-core:FacilityID",
  "@type": "rdfs:Class",
  "rdfs:label": "FacilityID",
  "schema:source": {
    "@id": "https://test.uncefact.org/vocabulary/untp/core/FacilityID"
  },
  "rdfs:comment": "The ID and Name of a facility. Used for lightweight links from other classes."
}

Whereas it more logically would be described as:

{
  "@id": "untp-core:FacilityID",
  "@type": "rdfs:Class",
  "rdfs:label": "FacilityID",
  "schema:source": {
    "@id": "https://test.uncefact.org/vocabulary/untp/core/FacilityID"
  },
  "rdfs:subClassOf": "untp-core:Identifier",
  "rdfs:comment": "The ID and Name of a facility. Used for lightweight links from other classes."
}