Closed evanp closed 5 years ago
@rhiaro is this feasible? I can take a stab at it.
@cwebber Do we need to vote on this in the CG? Or is there another process?
Hm interesting... do we have an implementation use case for including it?
I think if there's someone interested in using it that it would be welcome to discuss it in the next SocialCG call
Is the suggestion to add this but keep it namespaced under vcard: ? If so ok, if not I wonder if there may be a challenge in that at least url
is defined by both.
A lot of terms in vcard have equivalent terms in AS2 also. I wonder if it may be a good idea, should we go down this path, to cherry-pick specific vcard (or FOAF, and I really have no preference but that's a discussion we should have) items that implementors need and pull them into the context as they are deemed needed. What do you think of that?
I accidentally deleted my last comment (when trying to remove one that was an oops).
So... yes the as2 spec mentions vcard... but it doesn't imply it's in the context already. In example 15 it shows how an AS2 publisher could add it to their own context. https://www.w3.org/TR/activitystreams-core/#actors
@evanp I don't think it's obvious that we 'should' include it in the context. Why do you say that.
+1 to aliasing the vcard prefix. -1 to aliasing the vcard terms as as2 terms. That would play along with the spec (with no conflicts) and perhaps makes it convenient to some developers and better visibility.
If vcard terms were intended to be inherited by as2 - and it does not - the spec and the context would have reflected the use of those terms in a number of different ways already. The spec even exemplifies using terms with the vcard
prefix. Moreover, it suggests that something like vcard:Individual
should be accompanied with as:Person
.
Aside remark: as you all know, vCard is suitable (intended?) for "address book", describing "cards" and whatnot. Personally I think that's a good candidate for something like AP's Followers Collection, whereas FOAF may be more suitable for direct attributes of an actor. I don't have a strong preference here. I've seen them used interchangeably, but for some that do care about that distinction - for own merit - I think it is worthwhile to note here.
So, I did some data analysis. AS2 has 147 defined terms; vCard has 146. There are six terms that are common to both vocabularies:
I'm surprised how low that is.
I think that it would be quite reasonable to define aliases in the AS2 context doc for all of vcard except for the terms that overlap, and recommend using the namespaced version for those.
@gobengo Good question! The example you pointed to looks like this now:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{"vcard": "http://www.w3.org/2006/vcard/ns#"}
],
"summary": "Sally created a note",
"type": "Create",
"actor": {
"type": ["Person", "vcard:Individual"],
"id": "http://sally.example.org",
"name": "Sally Smith",
"vcard:given-name": "Sally",
"vcard:family-name": "Smith"
},
"object": {
"type": "Note",
"content": "This is a simple note"
}
}
If we include vcard terms in the AS2 context, it could look like this:
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally created a note",
"type": "Create",
"actor": {
"type": ["Person", "Individual"],
"id": "http://sally.example.org",
"name": "Sally Smith",
"given-name": "Sally",
"family-name": "Smith"
},
"object": {
"type": "Note",
"content": "This is a simple note"
}
}
The two big advantages for developers are:
@context
; just use the AS2 context.vcard:
terms.That may seem like a small benefit, but for a longer profile, it would save a lot of work.
For the same example, if we just include the vcard:
namespace in the context doc, but don't define any terms, we could do this:
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally created a note",
"type": "Create",
"actor": {
"type": ["Person", "vcard:Individual"],
"id": "http://sally.example.org",
"name": "Sally Smith",
"vcard:given-name": "Sally",
"vcard:family-name": "Smith"
},
"object": {
"type": "Note",
"content": "This is a simple note"
}
}
Just using the single string in @context
is a nice win, although I'd prefer getting rid of the namespace prefixes, also.
@cwebber the typical way I've seen vcard used in AS1 is for extended profile information. We don't have address and contact details or job details in AS2, so it's a nice extra.
+1 to the commit as written (just adding 'vcard' short name to context, not all terms therein)
We explicitly call out vcard in the AS2 document. We should include it in the context.