Open wouterbeek opened 1 year ago
There is no https variant, partly because the site is statically served. Conidering rdfa and microdata are also out there in both variants, some post-processing is always needed
On Wed, 22 Feb 2023 at 20:16, Wouter Beek @.***> wrote:
Observation
In line with the HTTPS/HTTP FAQ https://schema.org/docs/faq.html#19 Triply prefers the HTTPS variant of the Schema.org vocabulary over the HTTP variant (although both are fine and supported).
However, if we reference the Schema.org remote context we can only use the HTTP variant, and not the HTTPS variant. Specifically:
{ @.": "https://schema.org/", @.": "https://triplydb.com/DBpedia-association/dbpedia", @.***": "Dataset" }
results in:
https://triplydb.com/DBpedia-association/dbpedia a http://schema.org/Dataset.
^ Notice that the HTTP variant of the class is applied, not the HTTPS variant.
Live run in the JSON-LD Playground https://tinyurl.com/2s3def43 Expected
Specifying the HTTPS remote context to result in applying the HTTPS variants of the properties and classes.
— Reply to this email directly, view it on GitHub https://github.com/schemaorg/schemaorg/issues/3270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJSGLXQX4A2XEVMBFLQK3WYZX27ANCNFSM6AAAAAAVEY66RY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
There is no https variant, partly because the site is statically served. Conidering rdfa and microdata are also out there in both variants, some post-processing is always needed …
The issue is that the website uses the preferred form in all examples to start with https://
over http://
where the JSON-LD context itself which still uses http://
over https://
(look for the "@vocab": "http://schema.org/"
entry). This will block many users from moving to the preferred https://
IMHO.
Also note that in the codebase there is already some work done to switch to https, see this diff.
Everything is migrated except the ns of the triples emitted by json-ld parsers.
@RichardWallis are there any options for serving a different variant of the context when it is fetched by https?
@danbri There is no in-built configuration in our cloud hosted site to serve a different static file dependant on the protocol (http / https) used for a request.
This leaves two options:
I hit this issue while trying to check the sanity of the JSON-LD that was generated by my application. On the JSON-LD playground, the "Compact" feature fails due to the URI scheme mismatch. Consider the JSON-LD input:
{
"@context": "https://schema.org/",
"@type": "https://schema.org/WebPage"
}
Now if you try to compact that using the context shown, then the result is:
{
"@context": "https://schema.org/",
"type": "https://schema.org/WebPage"
}
i.e. https://schema.org/WebPage
did not compact to WebPage
.
I hope a note about this can be added to the FAQ where it says either scheme can be used.
A hack that comes to mind is just put the https-based context at a different path, i.e. require authors to use "@context": "https://schema.org/https.jsonld"
if they want to expand IRIs to HTTPS URIs. That would not be a problem for the cloud hosting, I hope.
This issue is being nudged due to inactivity.
I would like to upvote this issue.
Observation
In line with the HTTPS/HTTP FAQ Triply prefers the HTTPS variant of the Schema.org vocabulary over the HTTP variant (although both are fine and supported).
However, if we reference the Schema.org remote context we can only use the HTTP variant, and not the HTTPS variant. Specifically:
results in:
^ Notice that the HTTP variant of the class is applied, not the HTTPS variant.
Live run in the JSON-LD Playground
Expected
Specifying the HTTPS remote context to result in applying the HTTPS variants of the properties and classes.