Subject: atom:source interactions with xml:base/xml:lang

From: David Powell <[email-masked]>
Date: Fri, 8 Apr 2005 00:02:45 +0100

The inheritance of @xml:lang and @xml:base creates a lot of
complexities for an implementation. When they are used in combination
with atom:source, things get particularly bad.

Should we add some notes to the spec to remind people how to correctly
handle base and lang when atom:source-ifying entries?

A couple of the complexities are:

1) An @xml:base attribute declared on an entry might be relative to
the original feed's URI, or to @xml:base attributes on parent
elements. These need to be resolved before they can be copied across
into a second feed.

2) The source feed will have atom:entry as a child of atom:feed, but
the second feed will have atom:source as a child of atom:entry. This
switch in the hierarchy means that if the source feed contains an
@xml:lang tag on its entry, but not on its feed, you need to undeclare
@xml:lang on atom:source. Likewise, any @xml:base on atom:entry need
to be resolved because it can no longer be relative to the base of the
atom:feed element.

Eg:

  <atom:feed>
    <atom:title>Source feed</atom:title>
    ...
    <atom:entry xml:lang="de">
      <atom:title>Guten Tag</atom:title>
      ...
    </atom:entry>
  <atom:feed>

needs to be embedded as:

  <atom:feed>
    <atom:title>Second feed</atom:title>
    ...
    <atom:entry xml:lang="de">
      <atom:source xml:lang="">
        <atom:title>Source feed</atom:title>
        ...
      </atom:source>
      <atom:title>Guten Tag</atom:title>
      ...
    </atom:entry>
  <atom:feed>

-- 
Dave

---

From: Martin Duerst <[email-masked]>
Date: Fri, 08 Apr 2005 08:13:40 +0900

+1 to adding these kinds of clarifications and examples to the spec!

Regards,   Martin.

---

From: David Powell <[email-masked]>
Date: Fri, 8 Apr 2005 00:50:58 +0100

> +1 to adding these kinds of clarifications and examples to the spec!

The simplest thing would probably be to RECOMMEND that processors
resolve the base and lang values for the atom:entry and atom:feed
elements of source feed, and explicitly set these attributes on the
atom:entry and atom:source elements of the embedded entry.

-- 
Dave

---

From: David Powell <[email-masked]>
Date: Sun, 17 Apr 2005 22:15:31 +0100

I've posted a draft of PaceSourceRecs [1]. It proposes that an
informative section should be added to give some recommendations on
how to use safely use atom:source without screwing up xml:lang and
xml:base.

I'm not sure where the Informative section should go? Should it go
inline, as a sub-section of the description of atom:source, should it
go in a top-level section near the end, or does it belong in an
appendix?

Sorry about it being a bit rough around the edges, but I thought I'd
post it anyway to get some feedback.

[1] http://www.intertwingly.net/wiki/pie/PaceSourceRecs

-- 
Dave