Subject: Question regarding specification 4.1.1

From: Roland Jungwirth <[email-masked]>
Date: Wed, 07 Sep 2005 15:09:33 +0200

Hi,
I hope I am submitting this to the correct mailing list, if not, please 
feel free to delete the message and maybe point me in the right direction.

When going through the Atom specification regarding syntax 
(http://ietf.org/internet-drafts/draft-ietf-atompub-format-11.txt), I 
came to point 4.1.1 "The atom:feed Element". This states that every 
atom:feed element has to have one (and only one) atom:id element but can 
have 0:n atom:entry elements. One makes me wonder is the sentence after 
the constraint descriptions:
"If multiple atom:entry elements with the same atom:id value appear in 
an Atom Feed Document, they represent the same entry."
This does not seem logical (to me ;) ). If I have more than one entry in 
the feed, every entry is actually the same entry (as specified) - except 
for the updated timestamps which should be different. As I understand 
RSS feeds, there are many entries concerning a topic, but seeing that 
every entry is the same, there would always be only one topic entry, 
implying that there must be a new atom:feed for every new topic.entry 
and every atom:feed can have different "versions" of the same entry.
Am I interpreting the specification falsely? Or should the sentence 
actually state:
"If multiple atom:entry elements with the same atom:id value AND NO 
ENTRY:ID appear in an Atom Feed Document, they represent the same entry."?

Please clarify this to me.
Greetings
Roland

---

From: "A. Pagaltzis" <[email-masked]>
Date: Wed, 7 Sep 2005 15:36:01 +0200

* Roland Jungwirth <[email-masked]> [2005-09-07 15:15]:
> I hope I am submitting this to the correct mailing list, if
> not, please feel free to delete the message and maybe point me
> in the right direction.

You’re in the right place.

> Am I interpreting the specification falsely?

Yes.

> Or should the sentence actually state: "If multiple atom:entry
> elements with the same atom:id value AND NO ENTRY:ID appear in
> an Atom Feed Document, they represent the same entry."?

No. There is no such thing as a “entry:id”. “atom:id” refers to
an element called “id”, and the “atom:” prefix means it must be
in the Atom namespace. This is standard XML namespace lingo and
has nothing to do with the level at which an element appears in
the feed. You may want to look into namespaces in XML, if you do
not have a firm understanding of these.

atom:id elements can – in fact, MUST – appear as children of both
the top-level atom:feed as well as each individual atom:entry
element.

What the spec means is that different atom:entry elements
representing different entries must had different unique IDs, and
what it’s saying is that when there are multiple atom:entry
elements, and the values of their atom:id children are identical,
then all these atom:entry elements represent different versions
of one and the same entry.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

---

From: Eric Scheid <[email-masked]>
Date: Wed, 07 Sep 2005 23:51:30 +1000

On 7/9/05 11:09 PM, "Roland Jungwirth" <[email-masked]> wrote:

> have 0:n atom:entry elements.

The atom:id element as an *immediate* child of atom:feed is the ID for the
feed, while the atom:id element found as children of atom:entry elements are
the ID's of their respective atom:entry. Completely different things.

> an Atom Feed Document, they represent the same entry."

Consider this (abbreviated) example:

<feed>
    <id>some-id-for-the-feed</id>
    ...
    <entry>
        <id>id-for-entry-1</id>
        ...
    </entry>
    <entry>
        <id>id-for-entry-2</id>
        <updated>2005-09-06T01:00:00Z</updated>
        ...
    </entry>
    <entry>
        <id>id-for-entry-2</id>
        <updated>2005-09-06T01:05:00Z</updated>
        ...
    </entry>
</feed>

This feed contains three atom:entry elements, two of which are actually
separate representations of the same source entry, one at 1.00 AM, and one
from five minutes later.

In practice you probably won't see a mix like the above.

e.

---

From: Roland Jungwirth <[email-masked]>
Date: Wed, 07 Sep 2005 16:13:00 +0200

Hi,
And thank you for your clarification. I do understand XML namespacing 
but when declaring specifications, these should be as clear as possible, 
which - in my understanding - this is not. Especially regarding that 
there is no example clarifying this (as it is important) constraint.
Greetings
Roland

-- 
Roland Jungwirth

Xion IT Systems                 Tel:      0664-8242-628
AKTIENGESELLSCHAFT              Email:    [email-masked]
Dresdnerstraße 81-85/ 8.Stock   Web:      xion.at
A-1200 Wien                     Festnetz: +43/1/333 91 99-628
                                Fax:      +43/1/333 91 99-199

---

From: Roland Jungwirth <[email-masked]>
Date: Wed, 07 Sep 2005 16:12:01 +0200

Hi,
And thank you for your answer. I understand the structure, the problem 
is that the definition in the specification is not clear. It states 
(4.1.1 The "atom:feed" Element) that every atom:feed should have an id 
and every entry with the same atom:id are treated as the same entry. 
There is - however - no reference to this in 4.1.2 The "atom:entry", 
although this is where the destinction should actually be made. As it 
is, the specification is ambiguous resulting in some small implementer 
like myself not understanding it properly.
greetings
Roland

-- 
Roland Jungwirth