Re: **PROPOSED** AS2 spec update

On Fri, Nov 7, 2014 at 11:41 AM, Markus Lanthaler
<> wrote:
> 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": "",
>      "href": "",
>      "mediaType": "image/jpeg"
>    }
> instead of
>    "image": {
>      "@id": "",
>      "mediaType": "image/jpeg"
>    }

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": "",
    "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": "",
    "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> <>.
<urn:examples:markus:1> <as:image> <>.
<> <as:mediaType> "image/png".
<> <as:mediaType> "image/jpeg".
<> <as:displayName> "A picture of my dog".
<> <as:displayName> "A picture of James' dog".
<> <as:height> 100^^xsd:integer.
<> <as:height> 200^^xsd:integer.
<> <as:width> 100^^xsd:integer.
<> <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> <>.

_: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> <>.

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