-
Notifications
You must be signed in to change notification settings - Fork 29
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
HTML baseURI and @context? #53
Comments
We need to go a bit further and describe (syntax) and spec (api) how to retrieve a context when dereferencing the resolved URL results in an HTML document. This might include either/or fragment identifiers and Resolving a relative IRI reference to a context would be similar to resolving a relative IRI within embedded JavaScript, IMO, which would use the base URL of the script element. One interesting use case might be the following: <html>
<head>
<base href="http://example.org/" />
<script type="application/ld+json;profile=http://www.w3.org/ns/json-ld#context">
{
"@context": {"@vocab": "http://schema.org/"}
}
</script>
<script id="starthere" type="application/ld+json">
{
"@context": "",
"@id": "",
"@type": "Thing"
}
</script>
</head>
</html> If you expanded the document with target "starthere", it would load the context from itself, and use the first script, due to the type profile, setting [{
"@id": "http://example.org/",
"@type": ["http://schema.org/Thing"]
}] |
@gkellogg your comment above seems to take this in a different direction than what I understood @ajs6f to be describing. @ajs6f's description seems to match what I filed in w3c/json-ld-syntax#134 Your comment seems to wide the scope (understandably) to "what if the context URL is the HTML document (or another HTML document with an embedded context)?" Does that sound correct? If so, we should file a separate issue for the "extracting the context file from HTML" scenario. Cool? |
@BigBlueHat Yes, this gets back to our documentation issue, where we suggested that a JSON-LD document might reference an HTML document to get its context (or frame). |
I'd suggest we close this as superseded by w3c/json-ld-syntax#134 (comment) and the extraction of the "HTML as context file" expressed in #66. @azaroth42 that seem sensible re: github issue management? |
Closing as I think has been superseded by other issues mentioned above. |
We need to clarify the relationship between the base URI as derived from an embedding HTML document and a URI used for
@context
. Our work so far has addressed other kinds of URI resolution, but not this in particular.The text was updated successfully, but these errors were encountered: