Jan
My scenario is : A already have one server, this server is responsible for
one research (credit card), and I can access it using a AtomPub protocol.
Now I am developing a second application, one a second server, which need to
provide information about about generic tourists destinations. For each
destination I would like to link all acceptable credit cards.
To expose this "destination" resource, I would like to use AtomPub as well.
And to "link" both resources, I thought that atom:link element is the more
appropriate tag, right?
So, I end up with two different possible atom feeds for a destination (see
below).
The difference between them are minus, but important.
The first one has only one link, to all credit cards accepted by a given
destination (possible a complete feed).
The second one has 3 links, one for each credit cards accepted by a given
destination (possible 3 entries).
My question is : both approaches are correct? Which one would you use? Any
pros & cons ?
Thanks a lot!
Julio
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:d="http://destinos.abril.com.br/2010/destinos"
xmlns:xh="http://www.w3.org/1999/xhtml">
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<title>Brasil</title>
<summary type="plain/text">
Brasil, an amazing country.
</summary>
<content type="application/xhtml">
<xh:div> <b>Brasil</b> é um paÃs muito bonito... e a melhor
cidade é a de <b>São Paulo</b> ...</xh:div>
</content>
<link rel="credit-cards"
type="application/atom+xml&profile=vnd/abd-credit-card"
href="http://destination.example.com/destination/brazil/credit-cards"/>
</entry>
or
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:d="http://destinos.abril.com.br/2010/destinos"
xmlns:xh="http://www.w3.org/1999/xhtml">
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<title>Brasil</title>
<summary type="plain/text">
Brasil, an amazing country.
</summary>
<content type="application/xhtml">
<xh:div> <b>Brasil</b> é um paÃs muito bonito... e a melhor
cidade é a de <b>São Paulo</b> ...</xh:div>
</content>
<d:category>
<d:type>COUNTRY</d:type>
</d:category>
<link rel="credit-card"
type="application/atom+xml&profile=vnd/abd-credit-card"
href="http://destination.example.com/credit-card/amex"/>
<link rel="credit-card"
type="application/atom+xml&profile=vnd/abd-credit-card"
href="http://destination.example.com/credit-card/visa"/>
<link rel="credit-card"
type="application/atom+xml&profile=vnd/abd-credit-card"
href="http://destination.example.com/credit-card/mastercard"/>
</entry>
Post by Jan AlgermissenJulio,
I am afraid you need to provide more context....I don't get what you want to do.
Jan
Post by Julio LimaHi,
I'm working on a atom-entry spec for a "destination" feed. This
destination has relation with "credit-card" (all credit cards usually
accepted on that destination). Of course, one destination may have
more than one credit card associated.
First one, listing all links direct on entry (destination.xml) and
another way is to link to a entry point that list all credit cards
https://gist.github.com/5a38922984fd94398012
Which one would you use? Any pros & cons ?
Thanks a lot!
Julio
-----------------------------------
Jan Algermissen, Consultant
NORD Software Consulting
Blog: http://www.nordsc.com/blog/
Work: http://www.nordsc.com/
-----------------------------------