Description
Description
this issue is perhaps not entirely with AS2 as a spec and more with how it is used by some fediverse applications, but it's worth raising here.
tag
is defined by AS2-Vocab as: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag
One or more "tags" that have been associated with an objects. A tag can be any kind of Object. The key difference between attachment and tag is that the former implies association by inclusion, while the latter implies associated by reference.
however, section 5.6 "mentions, tags, and other microsyntaxes" seems to conflate some things. https://www.w3.org/TR/activitystreams-vocabulary/#microsyntaxes makes the overall general recommendation (normatively within a non-normative section? see #622 for more) that
While such microsyntaxes MAY be used within the values of the content, name, and summary properties on an Activity Streams Object, implementations SHOULD NOT be required to parse the values of those properties in order to determine the appropriate routing of notifications, categorization or linking between objects. Instead, publishers SHOULD make appropriate use of the vocabulary terms provided specifically for these purposes.
this advice is generally sound, especially when the default mediaType
for all content
is text/html
, which is generally pre-rendered and does not use microsyntax.
HOWEVER: this has not stopped implementers from trying to do microsyntax-y things on top of HTML, mostly citing this non-normative section as inspiration.
i'm fairly sure the intent here is for tag
to be used for taxonomical purposes (marking up related things so that you can draw associations later), not for microsyntax purposes (marking up content/summary/name to be rendered into rich entities or trigger certain processing requirements). in fact, the normative language (again, non-normative section) seems to demonstrate this intent quite clearly by saying that microsyntaxes SHOULD NOT be required for parsing; that you SHOULD use properties like to
or cc
for notifications, tag
for categorization, or whatever dedicated property makes semantic sense.
Outcome
maybe a Primer page? maybe Needs FEP? maybe Errata?
Discussion
the point of confusion is specifically that the non-normative examples are placed next to normative text in an overall non-normative section. this has led some implementers to treat the examples as perhaps more illustrative than they ought to be. also, the examples themselves are somewhat misleading, since they never actually demonstrate microsyntaxes properly except in Example 158, which uses a Mention
in tag
as an example of marking up @sally
in content
. there seems to be an implication (at best?) that the name
of the tag
corresponds or correlates to a substring of content
(hence, microsyntax). this implication doesn't really make sense in a world where the claim is "you SHOULD NOT have to parse microsyntaxes".
in fact, Example 158 in particular perhaps makes more sense if viewed as a continuation of Example 157 where you tag the Person instead of trying to use Mention
instead. the point that could have been made is that to
is for generating notifications, but tag
does not generate notifications. although even this much is further complicated by current fediverse implementations that seemingly require Mention tags in addition to the addressing properties, possibly even using the presence of a Mention
in tag
to generate notifications despite being warned that they SHOULD NOT do this and despite Example 158 being intended to demonstrate how to tag a Person/Mention without generating a notification.