w3c / activitystreams

Activity Streams 2.0
https://www.w3.org/TR/activitystreams-core/
Other
278 stars 62 forks source link

URI of type and id properties are actually URIs #480

Open gobengo opened 6 years ago

gobengo commented 6 years ago

Each property in the activitystreams-vocabulary document has a 'URI:' described. For most properties, the value of this table cell is what I'd expect, e.g. the URI of 'name' is https://www.w3.org/ns/activitystreams#name. Said another way, the URI of the property is what you'd get by expanding the term 'as:name' given the activitystreams2 JSON-LD context.

However, the 'URI' for 'id' is said to be '@id', and the 'URI' for 'type' is said to be '@type'.

Notably, '@id' and '@type' are not RFC 3986 URIs.

I am aware that simply JSON-LD expanding 'id' and 'type' against the AS2 context will result in '@id' and '@type' respectively, but that's not the same as those '@'-values being the URIs of the properties.

If you apply the same rule I describe above to these properties (i.e. resolve 'as:id' and 'as:type' against the context), you get these URIs that this PR changes them to.

gobengo commented 5 years ago

anyone have input?

nightpool commented 5 years ago

there is no property https://www.w3.org/ns/activitystreams#id, it's just a shortcut for the built-in JSON-LD value @id. it's incorrect to reference it as https://www.w3.org/ns/activitystreams#id

gobengo commented 5 years ago

I believe it's a design goal for AS2 to be a JSON syntax independent of any awareness of JSON-LD Or '@id'.

On Sat, Sep 15, 2018, 10:27 AM nightpool notifications@github.com wrote:

there is no property https://www.w3.org/ns/activitystreams#id, it's just a shortcut for the built-in JSON-LD value @id. it's incorrect to reference it as https://www.w3.org/ns/activitystreams#id

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/w3c/activitystreams/pull/480#issuecomment-421603555, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKfBssWC1a2zKkeMuStd0cyCxNDyzuZks5ubTh1gaJpZM4UqF_U .

nightpool commented 5 years ago

sure, and in json syntaxes, properties have no uri......

On Sat, Sep 15, 2018, 8:27 PM Benjamin Goering notifications@github.com wrote:

I believe it's a design goal for AS2 to be a JSON syntax independent of any awareness of JSON-LD Or '@id'.

On Sat, Sep 15, 2018, 10:27 AM nightpool notifications@github.com wrote:

there is no property https://www.w3.org/ns/activitystreams#id, it's just a shortcut for the built-in JSON-LD value @id. it's incorrect to reference it as https://www.w3.org/ns/activitystreams#id

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/w3c/activitystreams/pull/480#issuecomment-421603555 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAKfBssWC1a2zKkeMuStd0cyCxNDyzuZks5ubTh1gaJpZM4UqF_U

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/w3c/activitystreams/pull/480#issuecomment-421660599, or mute the thread https://github.com/notifications/unsubscribe-auth/AAORV9sr_xK6rUz1UZmgofbu2K_tIZGYks5ubZrbgaJpZM4UqF_U .

gobengo commented 5 years ago

(In my opinion) look this is a conceptual vocabulary before worrying about one-way-of-serialization idosyncracies like @id.

That's not actually why I filed this.

My use case here is in describing this vocabulary in a machine-readable way: https://github.com/gobengo/activitystreams2-spec-scraped/blob/master/data/activitystreams-vocabulary/1528589057.json#L1742

@nightpool I can't agree with a statement like 'there is no property' for 'id. Like... there is a thing that can be described, and is described in the spec, and it's in the 'properties' section. In that JSON-LD file I just linked to, I want to give that value an @id. What is the appropriate value?

nightpool commented 5 years ago

@gobengo you'll have to ask the JSON-LD people for a better answer, but my understanding is that @id isn't a property, it's a piece of syntax used to indicate the subject of a json-ld document.

cwebber commented 5 years ago

id and type are just aliases for @id and @type. This was done because people who use languages where they do hashmap access via dot-notation like foo.id weren't able to do foo.@id. (Personally I think it wasn't a good idea to do this, but that's all it does.)

gobengo commented 5 years ago

@cwebber Regardless of whether they are 'just aliases' of some other symbols, the issue at hand is the spec describe the 'URI' of these things. So does your statement imply a position on what the 'URI' of them is?

nightpool commented 5 years ago

Like I said, my understanding of the JSON-LD spec is that those properties are syntax, not URIs.

When using an algorithm to convert JSON-LD to RDF, in which everything is URIs, @id is obviously not converted to any URI, since its used to describe the referent that other properties refer to. @type is converted to http://www.w3.org/1999/02/22-rdf-syntax-ns#type, as defined explicitly by https://www.w3.org/2018/jsonld-cg-reports/json-ld-api/#algorithm-12

ninowalker commented 4 years ago

Is this dead? /cc @gobengo

gobengo commented 4 years ago

@ninowalker This issue? No... I think it's still a reasonable change.

However, the spec itself is now a 'finished' Technical Recommendation (https://www.w3.org/TR/activitystreams-core/), so there have been very few (if any) changes merged because it's not clear whether there will be a next revision (or if there needs to be).

Process wise, since the Social Web Working Group closed after completing it's charter, shepherding of the specs as moved to the Social Web Community Group. https://www.w3.org/wiki/SocialCG

This month at ActivityPub Conf we discussed SocialCG and other groups where future collaboration could happen. It sounds like some community members will start an off-w3c forum/list for ActivityPub-related collaboration. In addition, I've filed this issue in the SocialCG issue tracker to enable archives for a public mailing list.

@ninowalker Happy to help with any followup questions.

cjslep commented 4 years ago

I also read it in as a machine readable format and would like for it to stay aliased to @id and @type since I built go-fed/activity/astool to understand JSON-LD.

tpluscode commented 3 years ago

re #514

In the current shape, this PR should be closed without merging given what @nightpool also states above. id does not correspond to any URI. @type could be defined as rdf:type for the sake of having any URI but it technically is only aliasing JSON-LD features