17982Re: [rest-discuss] Re: Using # in link relations to distinct links of the same relationship type?
- Dec 1, 2011i would not use the @rel value as a sort key, either.
On Thu, Dec 1, 2011 at 02:10, Jakob Strauch <jakob.strauch@...> wrote:
Well, i think i meant something different: I want to express a relation ship like "the fifth element", no matter which entity it links to.
Orders of a customer:
<link href="/orders/2011/january/123" id="123" rel="http://example/order#1"/>
<link href="/orders/2011/june/987" id="987" rel="http://example/order#2"/>
There are already some relationship types for a small subset of this kind of relations: "first" and "last".
I ran into this questions while enhancing Darell Miller´s HAL serializer with the latest WCF Web API bits...
--- In firstname.lastname@example.org, mike amundsen <mamund@...> wrote:
> using HTML as an example...
> when servers i write want to pass the identity of an item in a response
> representation, i use @id (unique) or @name (non-unique) attributes
> the client apps i write use the @rel & @class attributes (both non-unique
> multi-valued fields) as a semantic identifier (i.e. what this _means_).
> i follow the same general rule for any custom designs (XML, JSON, etc.)
> that i create.
> mixing identity and meaning into the same attribute is, IMO, not a good
> idea. esp. in the long-term.
>> On Tue, Nov 29, 2011 at 17:54, Jakob Strauch <jakob.strauch@...> wrote:
> > Several times i came to the question, wheter to specify a relation with
> > some kind of index to distinct links of the same relationship type.
> > examples:
> > GET /products/canon
> > <category name="canon" ...>
> > <link href="..." rel="http://example.com/item#1" .../>
> > <link href="..." rel="http://example.com/item#2" .../>
> > <link href="..." rel="http://example.com/item#3" .../>
> > </category>
> > With this, one could give same relation-types different weights, an
> > order/index or different nuances.
> > Is it worth thinking about? Would it break something? What are the
> > arguments ´bout this topic around here? What are alternatives?
> > ------------------------------------
> > Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
- << Previous post in topic Next post in topic >>