- From: James M Snell <jasnell@gmail.com>
- Date: Wed, 4 Nov 2015 08:31:13 -0800
- To: Robert Sanderson <azaroth42@gmail.com>
- Cc: "public-socialweb@w3.org" <public-socialweb@w3.org>
This is one bit that is admittedly lacking in the current vocabulary definition and I appreciate the question on it. The fact of the matter is that `content` varies a bit based on the type of object. For a `Note` or `Article`, the `content` property contains the content of the resource itself. It's the actual markup text for the note/article. For an `Image` object, `content` is likely far less useful. In the use case you describe, using the `summary` field would be more appropriate: { "@context": "http://www.w3.org/ns/activitystreams", "@type": "Image", "displayName": "Small Red Square", "summary": "<p>This image is a small red square, for unknown use.</p>", "height": 100, "width": 100 } Using `content` in this case wouldn't be appropriate because unless you've base64 or hex encoded it, there's no means of actually including the actual binary content of the image resource in the JSON serialization. In short: `content` == the actual content of the resource, while `summary` == the description or short summary of the content. I can play around with some alternative ways of describing that in the vocabulary document and I'm always open to suggestions on how to improve the text :-) - James On Tue, Nov 3, 2015 at 10:18 PM, Robert Sanderson <azaroth42@gmail.com> wrote: > > Apologies for the likely newbie question, which is likely the first of many. > Please bear with me, and hopefully they can be treated as a input from > someone without all of the background knowledge you all have ... like most > readers will be :) > > > The `content` of an Object is "A natural language description of the object > content.". But not the content of the resource itself? Traditionally one > would call the property "description" rather than "content"? Which is not to > start a naming discussion, just to make sure that `description` is the > operative word, not `content` :) > > So this: > > { > "@context": "http://www.w3.org/ns/activitystreams", > "@type": "Image", > "displayName": "Small Red Square", > "content": "<p>This image is a small red square, for unknown use.</p>", > "height": 100, > "width": 100 > } > > Could be a 100x100 image, and `content` would describe the image, and > displayName give a label for it. (As per the example in the attachment > definition) > > So ... if you have a Note or Article without a URI, is there a way to > provide the actual representation of the resource, rather than a description > of that (err) content? Example 135 / Fig 37 in -core, however, gives the > impression that the representation is in the content field? > > Could someone please show how to model this situation in AS: > > The Object is a Note with the uri http://example.org/note1.md. It's in > Markdown and the note's representation is "You __won't believe__ what > happens at the end of [this video](youtube)!". The description of that > content is the HTML: "<span>Clickbait in Markdown</span>". > > Thanks! > > Rob > > -- > Rob Sanderson > Information Standards Advocate > Digital Library Systems and Services > Stanford, CA 94305
Received on Wednesday, 4 November 2015 16:32:00 UTC