json-ld / yaml-ld

CG specification for YAML-LD and UCR
https://json-ld.github.io/yaml-ld/spec
Other
19 stars 8 forks source link

Definition of yaml-ld namespace documents #77

Closed gkellogg closed 11 months ago

gkellogg commented 1 year ago

… and updates to the spec to…refer and use it.

For #13, #55, and #75.


Preview | Diff

gkellogg commented 1 year ago

This adds some framing keywords to the previous version discussed in the Best Practice section, and uses a versioned URI based on the yaml-ld namespace. It also defines the namespace documents (html and jsonld).

Once committed, will need @pchampin's aid in putting the files in place along with appropriate .htaccess for content negotiation.

gkellogg commented 1 year ago

I do not advise publishing a context which is specific to YAML.

The context is in the YAML-LD namespace, but of course, it could be used with any JSON-LD processor. Is there a more appropriate namespace to publish this? We did discuss https://json-ld.org/contexts/, but that does not have the same guarantees of permanent availability as the W3C namespace. Note that Verifiable Credientials (which is a Working Group, and the rules are different) uses a dated URL https://www.w3.org/2018/credentials/v1.

Moreover, this overloads the dollar sign, too...

??? It does not overload the dollar sign, just defines terms that begin with the dollar sign. This seemed to be the group consensus, other than some use of non-ascii characters instead.

If there's still controversy on using the $keywords, we'll hold of merging and discuss on the next call.

See the rest of the document for further comments.

TallTed commented 1 year ago

[@gkellogg] We did discuss https://json-ld.org/contexts/, but that does not have the same guarantees of permanent availability as the W3C namespace

https://json-ld.org/contexts/ could potentially be used as the "actual" home of the documents, with w3id.org holding the permalinks through whatever aliases make sense, as the latter can be re-redirected if the "actual" home needs to change for whatever reason ...

ioggstream commented 1 year ago

I do not advise publishing a context which is specific to YAML. The context is in the YAML-LD namespace,

I just meant that I expected YAML-LD to be interchangeable with JSON-LD without the need of bearing specific knowledge around.

If there's still controversy on using the $keywords, we'll hold of merging and discuss on the next call.

I am really sorry for appearing so assertive on this point, but I did not imagine the impacts of all this stuff were so wide as to affect implementations too.

Thank you all for your patience, R.

TallTed commented 1 year ago

Re: https://github.com/json-ld/yaml-ld/pull/77#issuecomment-1222683904

I should also note that w3.org URIs are preferred over w3id.org URIs in many WG-related scenarios, and while administration of w3.org redirects requires going through additional bureaucracy and lacks the simplicity of w3id.org updates via git, a functionally equivalent permalink-redirect arrangement should be possible.

pchampin commented 1 year ago

@ioggstream

I just meant that I expected YAML-LD to be interchangeable with JSON-LD without the need of bearing specific knowledge around.

and that's why, in my view, this "convenience context" is the right way to go. It simply relies on a standard JSON-LD mechanism.

Start with the following YAML-LD:

"@context": http://www.w3.org/ns/yaml-ld/v1
$id: http://champin.net/#pa
$type: http://schema.org/Person

Convert it to JSON(-LD)

{
  "@context": "http://www.w3.org/ns/yaml-ld/v1",
  "$id": "http://champin.net/#pa",
  "$type": "http://schema.org/Person"
}

which then expands to

{
  "@id": "http://champin.net/#pa",
  "@type": "http://schema.org/Person"
}

and converts to

<http://champin.net/#pa> a <http://schema.org/Person>.

As @gkellogg pointed out above, it could even be used in other JSON-LD documents where using $ instead of @ would be considered desirable. Conversely, its use would not be required by YAML-LD, and YAML-LD processors would still recognize good old @ keywords.

gkellogg commented 1 year ago

On today's meeting we resolved to postpone this and include something similar in a Best Practices document.

turn PR yaml-ld#77 to draft, and consider move this to Best Practices

There was further discussion about using a simpler bare-word Connivence Context, such as https://github.com/json-ld/convenience-context which we might host at https://json-ld.org/contexts/.