Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full example document contain errors #115

Closed
mbjones opened this issue Jul 29, 2020 · 7 comments
Closed

full example document contain errors #115

mbjones opened this issue Jul 29, 2020 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mbjones
Copy link
Collaborator

mbjones commented Jul 29, 2020

The full example document does not fully follow the guidelines. The SHACL validator reports four errors:

  • uses https instead of http namespace (won't fix as we changed the policy here for 1.2)
  • the identifier should be of type PropertyValue
  • the sameAs property is missing
  • the isAccessibleForFree property is missing

I will directly check in a fix for these to the develop branch for the next release (1.2).

In addition, the document types the schema:description field as "@type": "HTML",, which is not valid, and should be Text. This is not picked up by the SHACL validator. Can we make the validator find all undefined types and flag them, and flag when the type is not one of the recommended ones for a property in SO?

@mbjones mbjones added the bug Something isn't working label Jul 29, 2020
@mbjones mbjones added this to the v1.2 milestone Jul 29, 2020
@mbjones mbjones self-assigned this Jul 29, 2020
mbjones added a commit that referenced this issue Jul 29, 2020
@mbjones
Copy link
Collaborator Author

mbjones commented Jul 29, 2020

Fixed in SHA 40343e0, but let's discuss the issue with not finding the HTML type mismatch via SHACL @datadavev

datadavev added a commit to datadavev/science-on-schema.org that referenced this issue Jul 30, 2020
@ashepherd
Copy link
Member

ashepherd commented Aug 3, 2020

HTML is defined in the context here on line 5: https://schema.org/docs/jsonldcontext.json

@mbjones
Copy link
Collaborator Author

mbjones commented Aug 3, 2020

Interesting, Adam. I thought the official context file is at: https://schema.org/version/latest/schemaorg-current-https.jsonld

Which doesn't seem to have HTML. Is the file you cited an earlier version? Maybe I need to clarify where the official context files are. I got them from this page that has links in different formats: https://schema.org/docs/developers.html#defs

@ashepherd
Copy link
Member

very well may be wicked old apparently! Let's go with the official context cited on the developers page.

@datadavev
Copy link
Collaborator

JSON-LD remote context retrieval is described in https://www.w3.org/TR/json-ld11-api/#context-processing-algorithms

In brief, for schema.org, a context written:

{
   "@context":"http://schema.org/", 
   ... 
}

invokes the following sequence for the json-ld processor:

> GET "Accept: application/ld+json" "http://schema.org/"
< 301 "Location: https://schema.org/"

> GET "Accept: application/ld+json" "https://schema.org/"
< 200 Link: </docs/jsonldcontext.jsonld>; rel="alternate"; type="application/ld+json"

> GET "Accept: application/ld+json" "https://schema.org/docs/jsonldcontext.jsonld"
{
  "@context": {
    "type": "@type",
    "id": "@id",
    "HTML": {
      "@id": "rdf:HTML"
    },
  ...

(i.e., the context document is actually at https://schema.org/docs/jsonldcontext.jsonld)

Therein, HTML is mapped to rdf:HTML, which expands to http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML.

The vocabulary is a separate document that identifies the relationships of terms identified in the context. It is located at:

Equivalence mappings between the http and https terms was added recently (not yet available on the production site) at: https://github.com/schemaorg/schemaorg/blob/http-httpsequivs/data/releases/9.0/schemaorg-http-https-equivalents.jsonld

@mbjones
Copy link
Collaborator Author

mbjones commented Sep 25, 2020

Based on @datadavev 's synopsis, is there anything remaining here? Seems like this ticket can be closed if we are happy with the context resolution.

mbjones added a commit that referenced this issue Nov 2, 2020
This fixes up the last issue in #115.
@mbjones
Copy link
Collaborator Author

mbjones commented Nov 2, 2020

I checked and restored the HTML type to the document as per the comment by @datadavev above, and pushed to develop. So this issue is complete and closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants