Subject: Re: todo: add language encoding information

From: Henry Story <[email-masked]>
Date: Mon, 30 Jan 2006 18:13:17 +0100

Sorry for being away for a while. I am back on this issue. We had  
narrowed in on this quite well. It should be RFC time real soon.

On 24 Dec 2005, at 07:25, James Holderness wrote:
> Henry Story wrote:
>> I think you have not quite grasped the point my graph was trying to
>> make. Perhaps I did not explain myself clearly enough. The graph
>> represents a feed with three entries A, B and C.
>> B and C share the same id. C has an updated time stamp that is after
>> B so C is an update of B.
>
> If you went with my link+hreflang method, this could be handled  
> with an additional date attribute in the link, where the date  
> signified the time at which the translation was valid. For example:

Yes. Quite right.

> <entry>
>  <id>tag:eg.com,2005:/en/atom03</id>
>  <link hreflang="fr" x:id="tag:eg.com,2005:/fr/atom03"  
> x:updated="2005-11-15T18:30:02Z"/>
> </entry>
> <entry>
>  <id>tag:eg.com,2005:/fr/atom03</id>
>  <updated>2005-11-13T18:30:02Z</updated>
>  <link />
> </entry>
> <entry>
>  <id>tag:eg.com,2005:/fr/atom03</id>
>  <updated>2005-11-15T18:30:02Z</updated>
>  <link />
> </entry>

Presumably one would need to add an x:feed="http://mydomain.com/feed"  
attribute for translations of entries that appear in other feeds.

> I've left off the obvious elements and attributes for brevity, but  
> you get the idea.

yes I do.

Henry

---

From: Henry Story <[email-masked]>
Date: Mon, 30 Jan 2006 18:43:24 +0100

On 23 Dec 2005, at 12:37, Elliotte Harold wrote:

>
> Henry Story wrote:
>
>> The problem as I explained a little quickly in my mail yesterday,  
>> is that you are relating a entry and an id. Because there can be  
>> any number of entries with the same id it won't be clear which  
>> entry is the translation.
>
>
> I'm not sure if this is technically relevant or not, but in the  
> case at hand neither entry is the translation, or alternately both  
> are. Legally both are equally valid. This is customary in bi/ 
> multilingual jurisdictions and international treaties. For example,  
> article 133 of the Geneva convention states:
>
> The present Convention is established in English and in French.  
> Both texts are equally authentic. The Swiss Federal Council shall  
> arrange for official translations of the Convention to be made in  
> the Russian and Spanish languages.
>
> In that case, I suppose, neither English nor French is a  
> translation but  Russian and Spanish are.

Just re-reading your mail I think you make a good point that perhaps  
"translation" is the wrong word to use. We would like something more  
abstract such as "otherLanguageVersion". This made me think that the  
word we want is "alternate". And then looking at the spec again I  
found the following:

[[
4.2.7.4.  The "hreflang" Attribute

    The "hreflang" attribute's content describes the language of the
    resource pointed to by the href attribute.  When used together with
    the rel="alternate", it implies a translated version of the entry.
    Link elements MAY have an hreflang attribute, whose value MUST be a
    language tag [RFC3066].
]]

So don't we already have what Simon needs? By adding:

        <link href="http://example.org/2003/12/13/atom03/fr"  
hreflang="fr"/>

in our example entry we get

     <entry>
        <title>Atom-Powered Robots Run Amok</title>
        <link href="http://example.org/2003/12/13/atom03"/>
        <link href="http://example.org/2003/12/13/atom03/fr"  
hreflang="fr"/>
        <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
        <updated>2003-12-13T18:30:02Z</updated>
        <summary>Some text.</summary>
      </entry>

Using my previous diagram, we just have a alternate relation from an  
entry to
a piece of content as illustrated by the orange line here:

The alternate relation (like all the other relations shown above) are  
a little more complex that the simple arrows shown here as they can  
take language arguments for example.

So had I missed something previously? Or have I just forgotten  
something important?

Henry Story

>
> -- 
> Elliotte Rusty Harold  [email-masked]
> XML in a Nutshell 3rd Edition Just Published!
> http://www.cafeconleche.org/books/xian3/
> http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ 
> ref=nosim

---

From: "James Holderness" <[email-masked]>
Date: Tue, 31 Jan 2006 01:17:26 -0000

> 4.2.7.4.  The "hreflang" Attribute

This was the first thing I suggested...

"If you want to link the various translations together you can add one or 
more link elements at the top of the feed with rel="alternate" and hreflang 
set to the language of the alternate feed. If you're feeling really 
enthusiastic you can include alternate links pointing to the translated html 
pages for each entry too." [1]

Regards
James

[1] http://www.imc.org/atom-syntax/mail-archive/msg17609.html

---

From: "James Holderness" <[email-masked]>
Date: Tue, 31 Jan 2006 02:27:40 -0000

> attribute for translations of entries that appear in other feeds.

Actually I was thinking just a regular href and type. For example:

<link type="application/atom+xml"
  href="http://mydomain.com/feed"
  hreflang="fr"
  x:id="french_entry_id"
  x:updated="2005-11-15T18:30:02X" />

I'm not sure how valid that is considering a client that didn't understand 
this extension would consider the full feed to be an alternative for that 
one particular entry which doesn't seem right.

Personally I would have preferred using a fragment identifier. So the above 
example would look something like this:

<link type="application/atom+xml"
  href="http://mydomain.com/feed#french_entry_id"
  hreflang="fr"
  x:updated="2005-11-15T18:30:02X" />

And a link to an entry within the same feed could be done with a fragment 
only uri, like this:

<link type="application/atom+xml"
  href="#french_entry_id"
  hreflang="fr"
  x:updated="2005-11-15T18:30:02X" />

But from what I can make out, this sort of thing would only be valid if 
atom:id was defined to be an ID attribute which would assumedly require an 
Atom DTD.

Regards
James

---

From: Henry Story <[email-masked]>
Date: Tue, 31 Jan 2006 16:54:58 +0100

On 31 Jan 2006, at 03:27, James Holderness wrote:
> Personally I would have preferred using a fragment identifier. So  
> the above example would look something like this:
>
> And a link to an entry within the same feed could be done with a  
> fragment only uri, like this:
>
> But from what I can make out, this sort of thing would only be  
> valid if atom:id was defined to be an ID attribute which would  
> assumedly require an Atom DTD.

And that won't be quite possible because:
	- a feed can have a number of entries with the same id, whereas I  
think that when something is defined as being an ID attribute there  
can only be one instance in the same document (not absolutely sure  
about this though)
	- an id is not an attribute in atom xml, so I am not even sure this  
would be possible anyway

Also it is quite possible that the entry fall off the end of the feed  
after a while (usually just before it gets placed into an archive).  
So the link in your first example above would be falsified a little  
too easily.

Henry Story
http://bblfish.net/

---

From: Henry Story <[email-masked]>
Date: Tue, 31 Jan 2006 17:09:17 +0100

This looks like a good place to look for a solution.

On 31 Jan 2006, at 03:27, James Holderness wrote:
> Henry Story wrote:
>> Presumably one would need to add an x:feed="http://mydomain.com/ 
>> feed" attribute for translations of entries that appear in other  
>> feeds.
>
> I'm not sure how valid that is considering a client that didn't  
> understand this extension would consider the full feed to be an  
> alternative for that one particular entry which doesn't seem right.

Your point is well taken that the extension would be confusing for  
tools that did not understand it.  Perhaps one could create a new  
link rel="translation" that would point to a feed containing an  
alternate entry with the given x:id and updated at the particular time.

<link rel="translation"
       type="application/atom+xml"
       href="http://mydomain.com/feed"
       hreflang="fr"
       x:id="french_entry_id"
       x:updated="2005-11-15T18:30:02X" />

would that still be confusing to tools that did not understand the  
extension?

Henry

---

From: Eric Scheid <[email-masked]>
Date: Wed, 01 Feb 2006 12:10:16 +1100

> one particular entry which doesn't seem right.

Any reason that application/atom+xml document couldn't be an Atom Entry
Document, apart from the current lack of reader/browser support? It could
also then include the links necessary to subscribe to the specific language
feed.

e.