Ok... finally was able to get back to this... We have a couple of very real
world use cases for this already...

  http://tools.ietf.org/html/draft-snell-atompub-inline-00

This is a very rough beginning. Similar in nature to
draft-mehta-atom-inline-01 but allows for embedding arbitrary content types.
I'm certain there's a bunch more work to do on this but it's a start

On Wed, May 19, 2010 at 11:46 AM, Pablo Castro
<[email protected]>wrote:

> +1. We've been doing a very similar thing in OData (Astoria) for a while.
> We've used as custom element (<inline>) in a custom namespace inside
> <atom:link> for now because there wasn't anything standard. For example
> (trimmed down version, full version here:
> http://odata.netflix.com/catalog/Titles?$top=2&$expand=Cast&$filter=ReleaseYeareq
>  1980):
>
>  <entry m:etag="W/&quot;datetime'2009-10-07T05%3A06%3A22'&quot;">
>    <id>http://odata.netflix.com/catalog/Titles('13WZu')</id>
>    <title type="text">Metropolitan Opera: G. Puccini: Manon Lescaut</title>
>    <summary type="html">Conducted by James Levine, the Metropolitan Opera
> presents Puccini's "Manon Lescaut." In this opera, directed by Gian Carlo
> Menotti, the title character (&lt;a href="
> http://www.netflix.com/RoleDisplay/Renata_Scotto/83647"&gt;Renata
> Scotto&lt;/a&gt;) escapes from a French convent and runs away with a poor
> student, the Chevalier des Grieux (a young &lt;a href="
> http://www.netflix.com/RoleDisplay/Pl_cido_Domingo/30005475"&gt;Placido
> Domingo&lt;/a&gt;). Manon eventually leaves des Grieux for a wealthy elderly
> lover; however, her heart is torn when des Grieux catches up with
> her.</summary>
>    <published>2009-10-07T05:06:22Z</published>
>    <updated>2010-05-19T18:42:18Z</updated>
>    <author>
>      <name />
>    </author>
>    <link m:etag="&quot;10/7/2009 5:06:22 AM&quot;" rel="edit-media"
> title="Title" href="Titles('13WZu')/$value" />
>    <link rel="edit" title="Title" href="Titles('13WZu')" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/AudioFormats";
> type="application/atom+xml;type=feed" title="AudioFormats"
> href="Titles('13WZu')/AudioFormats" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Awards";
> type="application/atom+xml;type=feed" title="Awards"
> href="Titles('13WZu')/Awards" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Disc";
> type="application/atom+xml;type=entry" title="Disc"
> href="Titles('13WZu')/Disc" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Movie";
> type="application/atom+xml;type=entry" title="Movie"
> href="Titles('13WZu')/Movie" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Season";
> type="application/atom+xml;type=entry" title="Season"
> href="Titles('13WZu')/Season" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Series";
> type="application/atom+xml;type=entry" title="Series"
> href="Titles('13WZu')/Series" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/ScreenFormats";
> type="application/atom+xml;type=feed" title="ScreenFormats"
> href="Titles('13WZu')/ScreenFormats" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Cast";
> type="application/atom+xml;type=feed" title="Cast"
> href="Titles('13WZu')/Cast">
>      <m:inline>
>        <feed>
>          <title type="text">Cast</title>
>          <id>http://odata.netflix.com/catalog/Titles('13WZu')/Cast</id>
>          <updated>2010-05-19T18:42:18Z</updated>
>          <link rel="self" title="Cast" href="Titles('13WZu')/Cast" />
>          <entry>
>            <id>http://odata.netflix.com/catalog/People(83647)</id>
>            <title type="text">Renata Scotto</title>
>            <updated>2010-05-19T18:42:18Z</updated>
>            <author>
>              <name />
>            </author>
>            <link rel="edit" title="Person" href="People(83647)" />
>            <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Awards";
> type="application/atom+xml;type=feed" title="Awards"
> href="People(83647)/Awards" />
>            <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/TitlesActedIn";
> type="application/atom+xml;type=feed" title="TitlesActedIn"
> href="People(83647)/TitlesActedIn" />
>            <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/TitlesDirected";
> type="application/atom+xml;type=feed" title="TitlesDirected"
> href="People(83647)/TitlesDirected" />
>            <category term="NetflixModel.Person" scheme="
> http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"; />
>            <content type="application/xml">
>              <m:properties>
>                <d:Id m:type="Edm.Int32">83647</d:Id>
>                <d:Name>Renata Scotto</d:Name>
>              </m:properties>
>            </content>
>          </entry>
>          <entry>
>            <id>http://odata.netflix.com/catalog/People(30005475)</id>
>            <title type="text">Plácido Domingo</title>
>            <updated>2010-05-19T18:42:18Z</updated>
>            <author>
>              <name />
>            </author>
>            <link rel="edit" title="Person" href="People(30005475)" />
>            <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Awards";
> type="application/atom+xml;type=feed" title="Awards"
> href="People(30005475)/Awards" />
>            <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/TitlesActedIn";
> type="application/atom+xml;type=feed" title="TitlesActedIn"
> href="People(30005475)/TitlesActedIn" />
>            <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/TitlesDirected";
> type="application/atom+xml;type=feed" title="TitlesDirected"
> href="People(30005475)/TitlesDirected" />
>            <category term="NetflixModel.Person" scheme="
> http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"; />
>            <content type="application/xml">
>              <m:properties>
>                <d:Id m:type="Edm.Int32">30005475</d:Id>
>                <d:Name>Plácido Domingo</d:Name>
>              </m:properties>
>            </content>
>          </entry>
>        </feed>
>      </m:inline>
>    </link>
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Languages";
> type="application/atom+xml;type=feed" title="Languages"
> href="Titles('13WZu')/Languages" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Directors";
> type="application/atom+xml;type=feed" title="Directors"
> href="Titles('13WZu')/Directors" />
>    <link rel="
> http://schemas.microsoft.com/ado/2007/08/dataservices/related/Genres";
> type="application/atom+xml;type=feed" title="Genres"
> href="Titles('13WZu')/Genres" />
>    <category term="NetflixModel.Title" scheme="
> http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"; />
>    <content type="image/jpeg" src="
> http://cdn-4.nflximg.com/us/boxshots/large/5616554.jpg"; />
>    <m:properties xmlns:m="
> http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"; xmlns:d="
> http://schemas.microsoft.com/ado/2007/08/dataservices";>
>      <d:Id>13WZu</d:Id>
>      <d:Synopsis>Conducted by James Levine, the Metropolitan Opera presents
> Puccini's "Manon Lescaut." In this opera, directed by Gian Carlo Menotti,
> the title character (&lt;a href="
> http://www.netflix.com/RoleDisplay/Renata_Scotto/83647"&gt;Renata
> Scotto&lt;/a&gt;) escapes from a French convent and runs away with a poor
> student, the Chevalier des Grieux (a young &lt;a href="
> http://www.netflix.com/RoleDisplay/Pl_cido_Domingo/30005475"&gt;Placido
> Domingo&lt;/a&gt;). Manon eventually leaves des Grieux for a wealthy elderly
> lover; however, her heart is torn when des Grieux catches up with
> her.</d:Synopsis>
>      <d:Runtime m:type="Edm.Int32">8040</d:Runtime>
>      <d:AverageRating m:type="Edm.Double">3.3</d:AverageRating>
>      <d:ReleaseYear m:type="Edm.Int32">1980</d:ReleaseYear>
>      <d:Url>
> http://www.netflix.com/Movie/Metropolitan_Opera_G._Puccini_Manon_Lescaut/5616554
> </d:Url>
>      <d:Rating>NR</d:Rating>
>      <d:Type>Movie</d:Type>
>      <d:ShortName>Metropolitan Opera: Puccini</d:ShortName>
>      <d:Name>Metropolitan Opera: G. Puccini: Manon Lescaut</d:Name>
>      <d:TinyUrl>http://movi.es/13WZu</d:TinyUrl>
>      <d:WebsiteUrl m:null="true"></d:WebsiteUrl>
>      <d:NetflixApiId>http://api.netflix.com/catalog/titles/movies/5616554
> </d:NetflixApiId>
>      <d:BoxArt m:type="NetflixModel.BoxArt">
>        <d:SmallUrl>http://cdn-4.nflximg.com/us/boxshots/tiny/5616554.jpg
> </d:SmallUrl>
>        <d:MediumUrl>http://cdn-4.nflximg.com/us/boxshots/small/5616554.jpg
> </d:MediumUrl>
>        <d:LargeUrl>http://cdn-4.nflximg.com/us/boxshots/large/5616554.jpg
> </d:LargeUrl>
>        <d:HighDefinitionUrl m:null="true"></d:HighDefinitionUrl>
>      </d:BoxArt>
>      <d:Instant m:type="NetflixModel.InstantAvailability">
>        <d:Available m:type="Edm.Boolean">false</d:Available>
>        <d:AvailableFrom m:type="Edm.DateTime"
> m:null="true"></d:AvailableFrom>
>        <d:AvailableTo m:type="Edm.DateTime" m:null="true"></d:AvailableTo>
>        <d:HighDefinitionAvailable
> m:type="Edm.Boolean">false</d:HighDefinitionAvailable>
>      </d:Instant>
>      <d:Dvd m:type="NetflixModel.DeliveryFormatAvailability">
>        <d:Available m:type="Edm.Boolean">false</d:Available>
>        <d:AvailableFrom m:type="Edm.DateTime"
> m:null="true"></d:AvailableFrom>
>        <d:AvailableTo m:type="Edm.DateTime" m:null="true"></d:AvailableTo>
>      </d:Dvd>
>      <d:BluRay m:type="NetflixModel.DeliveryFormatAvailability">
>        <d:Available m:type="Edm.Boolean">false</d:Available>
>        <d:AvailableFrom m:type="Edm.DateTime"
> m:null="true"></d:AvailableFrom>
>        <d:AvailableTo m:type="Edm.DateTime" m:null="true"></d:AvailableTo>
>      </d:BluRay>
>    </m:properties>
>  </entry>
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of James Snell
> Sent: Tuesday, May 18, 2010 12:50 PM
> To: Nikunj Mehta
> Cc: Colm Divilly; [email protected]; Atom-Syntax
> Subject: Re: Atom Inlining (Was Link Extensions. Need "md5" or some kind of
> hash.)
>
>
> Non-Atom type support, I think, is definitely important. I also urge
> you to consider defining the element so that it is a part of the Atom
> namespace. Explosion and management of extension namespaces is going
> to become a significant problem as time goes on, we need to establish
> good practices for it now.
>
> On Tue, May 18, 2010 at 12:46 PM, Nikunj Mehta <[email protected]>
> wrote:
> > I can brush up the I-D and add the non-Atom type support, which was
> contemplated but waiting for more interest to be put in.
> >
> > Nikunj
> > On May 18, 2010, at 5:23 AM, Colm Divilly wrote:
> >
> >> James Snell wrote:
> >>> Another change that I am contemplating making is introducing a new
> >>> child element for the atom:link element that would allow it to serve
> >>> the same basic purpose as the GData feedLink and entryLink elements
> >>> except with greater flexibility... specifically, it would allow a
> >>> representation of the linked resource to be dropped directly into the
> >>> link element, e.g.
> >>>
> >>> <link rel="alternate" href="foo" type="text/plain">
> >>>  <data type="text">this is a representation of the data</data>
> >>> </link>
> >>>
> >>> <link rel="alternate" href="foo" type="image/jpeg">
> >>>  <data type="encoded">abc...def==</data> <!-- base64 -->
> >>> </link>
> >>>
> >>> <link rel="alternate" href="foo" type="application/atom+xml">
> >>>  <data type="markup">
> >>>    <feed>...</feed>
> >>>  </data>
> >>> </link>
> >>>
> >>> Or something along those lines.
> >>>
> >>> Thoughts?
> >>>
> >>>
> >> +1, I think this is really important, Whenever I am designing resources,
> I am always finding myself having to make a choice about whether to inline
> related content in the resource or include a hyper link to the related
> content. Having a consistent pattern for doing this would be beneficial.
> >>
> >> As an aside, if this approach was possible, then one could re-imagine
> the atom:content element as simply <link rel="content">...</link>.
> >>
> >> Nikunj Mehta has an unpublished draft of Atom Inline Extensions that
> proposes the same as what you propose [1] (the last published draft
> restricted the inline content types to atom resources only [2]),  Nikunj
> care to weigh in?
> >>
> >> There was some discussion about this a while back: [3]
> >>
> >> [1]
> http://atom-ext.googlecode.com/svn-history/r9/trunk/draft-mehta-atom-inline.xml
> >> [2] http://tools.ietf.org/html/draft-mehta-atom-inline-01#section-2.1.1
> >> [3] http://www.imc.org/atom-syntax/mail-archive/threads.html#21203
> >>
> >
> >
>
>
>
> --
> - James Snell
>  http://www.snellspace.com
>  [email protected]
>
>
>


-- 
- James Snell
  http://www.snellspace.com
  [email protected]

Reply via email to