ietf-wg-httpapi / linkset

Media Types and a Link Relation Type for Link Sets
https://datatracker.ietf.org/doc/draft-ietf-httpapi-linkset/
7 stars 8 forks source link

JSON-LD context relation #45

Closed philarcher closed 3 years ago

philarcher commented 3 years ago

Mark's final comment https://mailarchive.ietf.org/arch/msg/httpapi/gv9uqyD8Fv96P-_ip9LWIiCqALM/ is

The link relation type of http://www.w3.org/ns/json-ld#context is defined in W3C's JSON-LD 1.1 spec so it's out of our control here. See https://www.w3.org/TR/json-ld/#interpreting-json-as-json-ld. I wasn't involved in this work so I can't comment on why it's http and not https. Gregg Kellogg would know.

hvdsomp commented 3 years ago

We don't feel liking re-opening the can of worms of whether it should or should not be possible to use the IANA-registered link relation types as URIs for use in semantic web applications.

The proposal is:

@mnot, please let us know if not OK.

azaroth42 commented 3 years ago

It's http in JSON-LD 1.1 because we inherited it from JSON-LD 1.0. Manu Sporny might recall if there was discussion about http/https at that point, not sure that it's especially relevant to this work however.

mnot commented 3 years ago

Ah - if it's defined by JSON-LD, not this spec, never mind. Using IANA URLs without consulting IANA is pretty naughty of JSON-LD, though...

dret commented 3 years ago

On 2021-09-23 02:32, Mark Nottingham wrote:

Ah - if it's defined by JSON-LD, not this spec, never mind. Using IANA URLs without consulting IANA is pretty naughty of JSON-LD, though...

we're most definitely not defining it.

the RDF community has been struggling a long time with their constraint that identifiers must be URIs, whereas many IANA-managed identifiers are are just strings.

you might remember the discussions for RFC 5988/8288 which ended up with nothing because it was (too) hard to come to a solution that both works for the web and the semantic web.

azaroth42 commented 3 years ago

Err, to clarify which URI I was talking about http://www.w3.org/ns/json-ld#context is from JSON-LD 1.0 and continued in 1.1. I think the proposal to avoid the IANA relations in the JSON-LD context appendix is the easiest route, per @hvdsomp and @dret.

hvdsomp commented 3 years ago

I'd like to add a clarification:

As proposed above, in order to avoid using the IANA URI http://www.iana.org/assignments/relation/, the JSON-LD example of Appendix A will be replaced by one that does not rely on IANA-registered link relation types.

Having said that, I do want to express that I find it very regrettable that no mechanism exists to express IANA-registered link relation types as HTTP URIs. Having such a mechanism would be beneficial for interoperability between semantic and non-semantic applications. Direct results of not having such a mechanism:

azaroth42 commented 3 years ago

And in elsewhere in the W3C context, ActivityStreams also mapped 5988 links into its ontology: https://www.w3.org/TR/activitystreams-core/#link

philarcher commented 3 years ago

I'll discuss an example Linkset and context file with @hvdsomp and @dret offline. The example in my little Linkset visualization library demo at https://gs1.github.io/linkset/ is probably the best one I have to hand. It deliberately uses various features of Linkset. However, things like our link rel types of gs1:defaultLink and gs1:defaultLinkMulti are probably ones you don't want in this example but they can easily be stripped out.

I'm working to get our JSON-LD context file in place in its permanent URI - something that is proving more difficult than you'd imagine. It doesn't create URIs out of IANA link relations but I'm with @hvdsomp - it's a shame the situation is as it is on this one. Our link relations types are explicitly defined as RDF properties precisely so that our resolver service and its Linksets form a Linked Data node. Anyway, that's by the by...

phochste commented 3 years ago

The ActivityStreams link example 14 indeed adds more reasons why work on a JSON-LD context file is really needed. See also the Playground version of the string literals popping up in the resulting graph https://tinyurl.com/4r7jm4b3

hvdsomp commented 3 years ago

Addressed in https://github.com/ietf-wg-httpapi/linkset/commit/0838136141be028c968c748668c4544527d066ae

philarcher commented 3 years ago

Is everyone else happy with the revised version on this issue? (I am)

hvdsomp commented 3 years ago

For completeness of this thread, I want to add that the issue with expressing IANA-registered link relation types as HTTP URIs was also discussed in https://github.com/mnot/I-D/issues/140 and would likely also pop up in relation to https://github.com/protocol-registries/link-relations/issues/25

hvdsomp commented 3 years ago

Closing. Addressed in https://www.ietf.org/archive/id/draft-ietf-httpapi-linkset-04.html