Skip to content
Evan Prodromou edited this page Sep 5, 2018 · 14 revisions

There are four kinds of extensions to AS2 we want to track.

Established vocabularies

These are existing vocabularies that are used in AS2 documents, such as schema.org, vcard, or Dublin Core. For these, we should:

  • Note them on the AS2 wiki page Extensions
  • 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 namespaces

These are things that are really specific for a particular implementation, or are only used once. For example, pump.io includes internal database IDs and other debugging information under a pump.io namespace.

These extensions should:

Extensions on track for publication

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

  • define a namespace to be used by all implementations, such as https://as2dating.example/ns/

  • Implementors use the namespace in their contexts and the namespaced values in their documents:

    {
        "@context": ["https://www.w3.org/ns/activitystreams/",
        {"dating": "https://as2dating.example/ns/"}],
        "type": "Person",
        "dating:seekingGender": "any",
        "dating:geographicalRestrictions": {
            "dating:within": "50km",
            "dating:of": "https://places.example/New_York_City"
        }
    }

Mature 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 GitHub 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://as2dating.example/ns/",
  • 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"
        }
    }
Clone this wiki locally