- From: James M Snell <jasnell@gmail.com>
- Date: Fri, 7 Nov 2014 12:27:11 -0800
- To: Markus Lanthaler <markus.lanthaler@gmx.net>
- Cc: "public-socialweb@w3.org" <public-socialweb@w3.org>
On Fri, Nov 7, 2014 at 11:41 AM, Markus Lanthaler <markus.lanthaler@gmx.net> wrote: [snip] > > I think the crucial thing here is that we get rid of the "rel" property and use "proper" properties and types instead. The representation above makes it quite clear what the value of "image" is and why it is there. I expect people to struggle to understand why you would use > > "image": { > "@type": "http://www.w3.org/ns/activitystreams#Link", > "href": "http://example.org/martin/image.jpg", > "mediaType": "image/jpeg" > } > > instead of > > "image": { > "@id": "http://example.org/martin/image.jpg", > "mediaType": "image/jpeg" > } >[snip] Scenario: You and I respectively publish the following: { "@id": "urn:examples:james:1", "@type": "urn:examples:types:article", "displayName": "James' Article", "content": "I wrote this", "image": { "@id": "http://example.org/images/dog", "mediaType": "image/jpeg", "displayName": "A picture of my dog", "height": 100, "width": 100 } } { "@id": "urn:examples:markus:1", "@type": "urn:examples:types:article", "displayName": "Markus' Article", "content": "Markus wrote this", "image": { "@id": "http://example.org/images/dog", "mediaType": "image/png", "displayName": "A picture of James' dog", "height": 200, "width": 200 } } Both get pushed into the same system. The idea here is: for my post, I want the associated jpeg image to be displayed at 100x100px with one caption (displayName). while you want the associated image to be displayed at 200x200px with a different caption (displayName). What we end up with is: <urn:examples:james:1> <as:image> <http://example.org/images/dog>. <urn:examples:markus:1> <as:image> <http://example.org/images/dog>. ... <http://example.org/images/dog> <as:mediaType> "image/png". <http://example.org/images/dog> <as:mediaType> "image/jpeg". <http://example.org/images/dog> <as:displayName> "A picture of my dog". <http://example.org/images/dog> <as:displayName> "A picture of James' dog". <http://example.org/images/dog> <as:height> 100^^xsd:integer. <http://example.org/images/dog> <as:height> 200^^xsd:integer. <http://example.org/images/dog> <as:width> 100^^xsd:integer. <http://example.org/images/dog> <as:width> 200^^xsd:integer. Which is clearly not what was intended. Using as:Link what we get is: <urn:examples:james:1> <as:image> _:c14n0. <urn:examples:markus:1> <as:image> _:c14n1. ... _:c14n0 <rdf:Type> <as:Link>. _:c14n0 <as:mediaType> "image/jpeg". _:c14n0 <as:displayName> "A picture of my dog". _:c14n0 <as:height> 100^^xsd:integer. _:c14n0 <as:width> 100^^xsd:integer. _:c14n0 <as:href> <http://example.org/images/dog>. _:c14n1 <rdf:Type> <as:Link>. _:c14n1 <as:mediaType> "image/png". _:c14n1 <as:displayName> "A picture of James' dog". _:c14n1 <as:height> 200^^xsd:integer. _:c14n1 <as:width> 200^^xsd:integer. _:c14n1 <as:href> <http://example.org/images/dog>. Which is what was intended. It's also worth pointing out that this is essentially the same linking model we have in HTML5, Atom, and many other formats. It's not unique. In fact, the draft makes it very clear that as:Link is designed around the RFC5988 Link model. As I've pointed out, however, if you want the direct association as you suggest, the model as currently defined let's you do that too. - James
Received on Friday, 7 November 2014 20:27:58 UTC