-
Notifications
You must be signed in to change notification settings - Fork 66
Extension process
Evan Prodromou edited this page May 9, 2018
·
14 revisions
There are four kinds of extensions to AS2 we'd want to track.
- Established vocabularies. These are existing vocabularies that are adapted for AS2, such as schema.org, vcard, or Dublin Core. For these, we should:
- Note them on an AS2 wiki page
-
Possibly add the namespaces to the AS2 context document. It's not clear what the acceptance criteria for this would be. The best way to discuss is via a Github issue. It would work like so:
{ "@context": { "@vocab": "_:", "xsd": "http://www.w3.org/2001/XMLSchema#", "as": "https://www.w3.org/ns/activitystreams#", "ldp": "http://www.w3.org/ns/ldp#", "vcard": "http://www.w3.org/2006/vcard/ns#",
- Possibly add the terms to the AS2 context document when there is no conflict. No clear acceptance criteria yet. The best way to discuss is via a Github issue.
- Single-implementation extensions. These are things that are really specific for a particular implementation, or are only used once. These should:
- use a namespace out there somewhere (http://yoursoftware.example/ns)
- be linked to from the AS2 wiki page Extensions
- Multiple-implementation extensions still in development. For when we're experimenting with new problem areas that need new vocabulary terms, but we're not quite sure about them yet. For these, we should:
- Declare it with a Github issue
- use some kind of sub-namespace of AS2 (https://www.w3.org/ns/activitystreams/dating# or https://www.w3.org/ns/activitystreams#dating?)
- Implementors use the namespace in their contexts and the namespaced values in their documents:
{ "@context": ["https://www.w3.org/ns/activitystreams/", {"dating": "https://www.w3.org/ns/activitystreams/dating#"}], "type": "Person", "dating:seekingGender": "any", "dating:geographicalRestrictions": { "dating:within": "50km", "dating:of": "https://places.example/New_York_City" } }
- Well-established extensions. If an extension vocabulary is "well-established" (2+ implementations in production use, say?). For these, we should:
-
Suggest moving it to the main context document with a GH issue
-
Add the namespace to the main AS2 context document. For example:
{ "@context": { "@vocab": "_:", "xsd": "http://www.w3.org/2001/XMLSchema#", "as": "https://www.w3.org/ns/activitystreams#", "ldp": "http://www.w3.org/ns/ldp#", "dating": "https://www.w3.org/ns/activitystreams/dating#",
-
Add the terms to the main AS2 context document, if there are no conflicts. For example,
"seekingGender": "dating:seekingGender", "geographicalRestrictions": "dating:geographicalRestrictions"
-
document them on the namespace HTML document.
-
implementations can either use the namespaced terms or the non-namespaced terms, and they'll still have the same identity:
{ "@context": "https://www.w3.org/ns/activitystreams/", "type": "Person", "seekingGender": "any", "geographicalRestrictions": { "dating:within": "50km", "of": "https://places.example/New_York_City" } }