-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Non-normative Section 5.6 of AS2-Vocab inspires problematic usage of tag
for microsyntaxes instead of taxonomies
#623
Comments
I'm not sure I understand the distinction you're making here in terms of "taxonomical" parsing vs "microsyntax" parsing.
The language you quote is saying that you can't use a Mention to replace a Regardless of the original intent, microsyntaxes are clearly very useful and an important part of the specification, so I don't understand why we would remove them. |
taxonomical meaning "here are some related things". if i tag a Person then i can later query/filter for all objects that have a in other words, {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://social.example/some-object",
"type": "Image",
"summary": "Picture of Sally",
"tag": {
"id": "https://social.example/users/72559",
"type": "Person",
"name": "Sally"
}
} {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://social.example/some-object",
"type": "Image",
"summary": "Picture of Sally",
"tag": {
"href": "https://social.example/~sally",
"type": "Mention",
"name": "Sally"
}
} because which is not very useful unless you intend to process it as a Link, e.g. taking the natural language taking another example from elsewhere, we can say that syntactically the following:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"richText": {
"@id": "https://w3id.org/fep/xxxx/richText",
"@type": "@id",
"@container": "@set"
}
}
],
"content": "Go to this site",
"mediaType": "text/plain",
"richText": [
{
"type": "Link",
"href": "https://example.com",
"name": "this site"
}
]
} which again renders to or perhaps you interpret {
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"richText": {
"@id": "https://w3id.org/fep/xxxx/richText",
"@type": "@id",
"@container": "@set"
},
"applyToProperty": {
"@id": "https://w3id.org/fep/xxxx/applyToProperty",
"@type": "@vocab",
"@container": "@set"
},
"applyFromByte": "https://w3id.org/fep/xxxx/applyFromByte",
"applyUntilByte": "https://w3id.org/fep/xxxx/applyUntilByte",
"applyEntity": {
"@id": "https://w3id.org/fep/xxxx/applyEntity",
"@type": "@id"
},
"LinkMicrosyntax": "https://w3id.org/fep/xxxx/LinkMicrosyntax"
}
],
"content": "Go to this site",
"mediaType": "text/plain",
"richText": [
{
"type": "LinkMicrosyntax",
"applyToProperty": ["content"],
"applyFromByte": 6,
"applyUntilByte": 15,
"applyEntity": {
"type": "Link",
"href": "https://example.com",
"name": "some title"
}
}
]
} which renders to in pretty much every case where you have pre-rendered HTML you don't actually need to know what microsyntax was used to generate that HTML. it's frankly irrelevant whether you used Markdown or bbCode or AsciiDoc or reStrucuteredText or org-mode or whatever else. the only unique arguments and use-cases i can think of for having metadata on a Link used in Go to <a
href="https://example.com"
title="some title"
rel="external"
type="application/activity+json"
hreflang="en"
>this site</a> given this HTML, it's not super useful to have an equivalent linked data node representing the same information, unless you need to parse microsyntax, which you SHOULD NOT need to do.
that's the thing though -- they're not actually! the spec says you shouldn't need them, because dedicated properties exist. it's almost purely conventional that some software will {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://social.example/some-object",
"type": "Image",
"summary": "Picture of Sally",
"tag": {
"href": "https://social.example/~sally",
"type": "Mention",
"name": "Sally"
}
} {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://social.example/some-object",
"type": "Image",
"summary": "<p>Picture of <a href=\"https://social.example/~sally\">Sally</a></p>"
} you don't actually need the this isn't to say that we should altogether remove |
doing a little archaeology it looks like the following information might be interesting or relevant january - february 2015
october 2015
|
Actually, it was, it was explicitly linked to the Mention example as given in the microsyntaxes section at that time:
which seems substantially similar to the microsyntaxes example as it exists in the spec today. So it was specifically left in because of use-cases like this. But that was only one example of how Mention could be used, and the resolution was to leave it in since it was "useful to implementors". Having a |
i may have unintentionally sidetracked the conversation by talking about Mention (which i maintain is generally less useful than tagging the actor directly) but
the end result is that
again i'm finding it hard to talk about this issue in a precise manner because it doesn't strictly deal with the model of AS2 but rather the metamodel of certain fediverse implementations. the proposed outcomes, but in more detail
which is to say: don't just assume that by which i mean: clarify that just because you can in short: the assumption to break is that |
So, I think the core concern here is that the "Microsyntax" section of the vocabulary document shows two examples of connecting microsyntax in the text ( I think there are several steps that we can take here to help with this issue.
I think that it would make sense to include this kind of guidance in a next version of AS2 Vocabulary. I'm not sure that the lack of this guidance rises to the level of an erratum, so I don't think we should do that now. |
I also think a Primer page on best practices for defining microsyntaxes as well as documenting known microsyntaxes can be useful. And the next version of AS2 could include not only an example that doesn't create a |
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-taghowever, 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
this advice is generally sound, especially when the default
mediaType
for allcontent
istext/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 liketo
orcc
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
intag
as an example of marking up@sally
incontent
. there seems to be an implication (at best?) that thename
of thetag
corresponds or correlates to a substring ofcontent
(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 thatto
is for generating notifications, buttag
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 aMention
intag
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.The text was updated successfully, but these errors were encountered: