-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Please clarify "items" and "orderedItems" properties #437
Comments
What do you mean by "omitted" ? - is it the same as in #443 for |
No. The natural language variants However, the ActivityStreams Core spec refers to the
Which to me implies it is OK to have a In the ActivityStreams Vocabulary spec, properties section there are no references to the 'orderedItems' property at all. However, the
This to me makes it sound like it is OK to have a |
I see, so I edited the comment below. |
I also think it would best serve spec-readers to include 'orderedItems' under https://www.w3.org/TR/activitystreams-vocabulary/#properties |
I interpreted Vocabulary spec on items to mean:
So a mutually exclusive choice. As explained by @cjslep like 'all combinations are possible' would be inconsistent, IMHO, and lead to unnecessary code in an implementation. |
Righty. So @aschrijver's interpretation of the text is probably exactly how The issue @cjslep is raising is the fact that
And it is linked from the namespace document to the Activity Vocabulary document: https://www.w3.org/TR/activitystreams-vocabulary#dfn-ordereditems BUT, if you follow that link to the Activity Vocabulary document, you will discover that Conversely, compare the link from the namespace document for I imagine if I've not read the listserv thread @cjslep references but I suspect this is what he is getting at. Is this omission intentional? If so, why? If not, then |
|
#507 has a more thorough description of the issue, as well as links to other discussions |
I feel the desire to split hairs on this - Which brings me back to this Issue topic, titled "Please clarify 'items' and 'orderedItems' properties." Given the number of times this has come up, with the potential semantic issues, do the editors think this is clear? If so, I would say close this issue with a note that says "perfectly clear and no problem." If not, I, like @cjslep , think this needs some clarification and I will try one last time.
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally's notes",
"type": "Collection",
"totalItems": 2,
"orderedItems": [
{
"type": "Note",
"name": "Reminder for Going-Away Party"
},
{
"type": "Note",
"name": "Meeting 2016-11-17"
}
]
} {
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally's notes",
"type": "OrderedCollection",
"totalItems": 2,
"items": [
{
"type": "Note",
"name": "Reminder for Going-Away Party"
},
{
"type": "Note",
"name": "Meeting 2016-11-17"
}
]
} |
There are two main problems here:
I think there are two remedies for this problem.
|
https://www.w3.org/wiki/Activity_Streams/Primer/Collections has guidance for publishers and consumers for dealing with collections, pages, and properties. |
My next TODO on this topic is to propose an addition to the ERRATA for Activity Streams 2.0 and submit it for approval by the CG. |
Is there a semantic difference between orderedItems and items of an ordered collection? I wonder if we shouldn’t just deprecate
I believe we should have a concept of 1 collection that has multiple views, and each of these views can be ordered or structured in a different way. That’s the way we do it in TREE. In one project, we would now see the |
there is no semantic difference but there is a major syntactic difference, one is a @list and the other is a @set, so one has a range of ordered lists and the other is just a normal triple. there is no easy way to represent this distinction in JSON-LD without 1) using two properties or 2) imposing arcane and bad syntax on pure json consumers. this is the best compromise |
The current situation is the best compromise? Assuming, yes, I'm not sure a compromise that promotes this level of questioning is the "best." Why, exactly, is defining an additional property in the AS namespace (as is currently advertised, but not actually done) a problem? |
Couldn’t you do something like this to make both worlds happy? {
"@context": {
"items" : {"@id": "as:items", "@container": "@set"},
"orderedItems" : { "@id": "as:items", "@container": "@list"}
}
} EDIT: actually, this is how it is done if i’m not mistaken, which is actually the whole reason why orderedItems is a JSON-LD label, but not a separate IRI. So in my opinion, nothing needs to be done at the moment and this issue can be closed: it’s only a JSON-specific thing. I would also like to make a side-note here however that I believe using an |
As a side note, in JSON-LD 1.1 (but not in 1.0), you could type-scope the {
"@context": {
"items": {
"@id": "as:items",
"@container": "@set"
},
"OrderedCollection": {
"@id": "as:OrderedCollection",
"@context": {
"@propagate": false,
"items": {
"@id": "as:items",
"@container": "@list"
}
}
}
}
} But Activity Streams is based on JSON-LD 1.0, and besides, this definition of the |
Please Indicate One:
Please Describe the Issue:
(I am splitting my email to the public-socialweb mailing list into separate issues, for background please see those emails).
This is ActivityStream vocabulary specific: https://www.w3.org/TR/activitystreams-vocabulary
The "orderedItems" property is omitted from the spec and only present in examples. Therefore, for an OrderedCollection there is no guidance on how to resolve "items" and "orderedItems" if one or both are present. Nor is there guidance whether a "type" property of "Collection" with a "orderedItems" property is in or out of spec.
The text was updated successfully, but these errors were encountered: