Open azaroth42 opened 6 years ago
Part of this can be separated: allowing HTML with embedded JSON-LD to be used as a context. Might consider using type="application/ld+json;profile="http://www.w3.org/ns/json-ld#context"
, presuming that @type
on a script element can include such a parameter on the media type. In any case, it would fall back to using the first found script
element of type application/ld+json
.
Chasing down the @type
attribute:
Setting the attribute to any other value means that the script is a data block […] Authors must use a valid MIME type that is not a JavaScript MIME type to denote data blocks.
A string is a valid MIME type if it matches the media-type rule. In particular, a valid mime type may include MIME type parameters.
@type
attribute, and explicitly allows for parameters, which also includes profiles which we do register.Note that the HTML spec also has a separate notion on valid mime type with no parameters, which it uses for, e.g., @accept
. The fact that it does have attributes where the profile cannot be used reinforces the fact that otherwise it can…
I.e, yes, we can use the profile
in the <script>
element.
An ignored keyword in the context that embeds data (#32, #40)
The ability to add metadata to a context (or temps definitions, for that matter) would indeed be nice. I know that @rubensworks would have some use for it.
Just a note (half to self) that the introduction of Link ; rel=alternate
should be considered for this issue. Whether we recommend using it for documentation or dis-recommend or something else, we should have a strongly-expressed opinion. 😉
Consider best practices around the documentation of contexts and frames.
Options include:
To be considered during CR/PR phase as best practices. WG consensus is not to pursue this as a normative requirement.