On 22 Dec 2005, at 21:34, James M Snell wrote:
In that case, the only viable solution is an extension element.
Yep. I have added James Holderness's solution and clarified the
points in N3.
This is similar to the Thread Extension use case in which replies
may appear within the same feed as the original.
Here's how I would do it:
1. Introduce a new <translation> element.
<translation id="id_of_resource" />
That was like my first example rdf. And my question there was: would
this mean that the entry containing the translation element was a
translation of a entry with the given id, or of all entries with the
given id, or that all entries with the id of the containing element
were translations of entries with the given id? The problem is that
when one makes a translation of something one really wants to specify
which version of the entry pointed to is the translation. Things may
otherwise get to be quite misleading.
2. Use rel="alternate", hreflang="{otherlanguage}" to point to
other documents that may contain translations. I would prefer a
"translation" link rel but agree that reuse of alternate is better.
This solution is best for pointing to the place where the content of
the entry is translated I suppose. Here we are saying that the
content is translated at a certain place. In theory the titles and
the summaries could in both entries remain in english.
[ a :Feed, :Version;
:entry [ a :Entry;
:title [ :value "Atom-Powered Robots Run Amok";
:type "text/plain" ];
:link [ :href <http://example.org/2003/12/13/en/atom03>;
:rel iana:alternate ];
:id <tag:example.com,2005/en/atom03>;
:updated "2003-12-13T18:30:02Z"^^xsd:dateTime;
:summary [ :value "After a course of integration in
French philosophy,...";
:type "text/plain" ];
:content <http://example.org/2003/12/13/en/atom0.html>;
:translation [ = <http://example.org/2003/12/13/fr/
atom0.html>;
:representation [ :type "text/html";
:lang "fr" ]
]
];
:entry [ a :Entry;
:title [ :value "Des Robot Atomiques se rebellent";
:type "text/plain" ];
:link [ :href <http://example.org/2003/12/13/fr/atom03>;
:rel iana:alternate ];
:id <tag:example.com,2005/fr/atom03>;
:updated "2003-12-13T18:30:02Z"^^xsd:dateTime;
:content <http://example.org/2003/12/13/fr/atom0.html>;
:translation [ = <http://example.org/2003/12/13/en/
atom0.html>;
:representation [ :type "text/html";
:lang "en" ]
];
];
] .
3. The suggestion by James Holderness
Alternatively you could create a separate Atom document for each
entry and then each entry in the feed would include a @rel='self'
link pointing to their corresponding document with
@type='application/atom+xml' as well as a @rel='alternate' links
pointing to the Atom documents of any translations (also with
@type='application/atom+xtml').
I suppose this would be a way to identify particular entries with
urls so that they could be identified directly, and so the entries
would be specified as translations of each other. In N3 this would be
something like my second example, but we use urls to identify the
entries and place the content at the url location.
That seems more appropriate when one wants the point to a translation
that translates both the content and the title and the summary (and
the metadata?).
[ a :Feed, :Version;
:entry <http://example.org/2003/12/13/en/atom03.atom>;
:entry <http://example.org/2003/12/13/fr/atom03.atom>
] .
http://example.org/2003/12/13/en/atom03.atom would return the
following representation
-----8<---
<> a :Entry;
:title [ :value "Atom-Powered Robots Run Amok";
:type "text/plain" ];
:link [ :href <http://example.org/2003/12/13/en/atom03>;
:rel iana:alternate ];
:id <tag:example.com,2005/en/atom03>;
:updated "2003-12-13T18:30:02Z"^^xsd:dateTime;
:summary [ :value "After a course of integration in
French philosophy,...";
:type "text/plain" ];
ext:translation <http://example.org/2003/12/13/fr/
atom03.atom>.
-----8<---
http://example.org/2003/12/13/fr/atom03.atom would return the
following representation
-----8<---
<> a :Entry;
:title [ :value "Des Robot Atomiques se rebellent";
:type "text/plain" ];
:link [ :href <http://example.org/2003/12/13/fr/atom03>;
:rel iana:alternate ];
:id <tag:example.com,2005/fr/atom03>;
:updated "2003-12-13T18:30:02Z"^^xsd:dateTime;
:summary [ :value "Apres un cours d'integration en
philosophie francaise...";
:type "text/plain" ]
ext:translation <http://example.org/2003/12/13/en/
atom03.atom> .
-----8<---
Does that cover all cases?
(I may be a little less quick to respond in the next few days, though
I'll try my best to keep up on this :-)
Henry
- James
Henry Story wrote:
Yes. That is one solution. But what we are looking for is how one
can state that two entries in the same feed are translations of
one another.
Henry
On 22 Dec 2005, at 20:52, James M Snell wrote:
Hmmm.. interesting thought, hadn't considered that.
rel="self" should always point to *this* document, and never to
some other document, but if the document referenced is the same
document just in a different language, then it is possible? Good
thinking but I'm not sure if it's legal according to the spec.
<feed xml:lang="de">
...
<link rel="self"
hreflang="fr"
href="http://.../thefeed?lang=fr"
<link rel="self"
hreflang="de"
href="http://.../thefeed?lang=de"
<entry>
<id>tag:example.org,2005:some_entry</id>
...
</entry>
</feed>
- James
A. Pagaltzis wrote:
* James M Snell <[EMAIL PROTECTED]> [2005-12-22 19:30]:
To indicate that the feeds were translations of one another, a
new "translation" link rel could be established on the feed
level
<feed xml:lang="de">
...
<link rel="translation"
hreflang="fr"
href="http://.../thefeed?lang=fr"
<entry>
<id>tag:example.org,2005:some_entry</id>
...
</entry>
</feed>
<feed xml:lang="fr">
...
<link rel="translation"
hreflang="de"
href="http://.../thefeed?lang=de"
<entry>
<id>tag:example.org,2005:some_entry</id>
...
</entry>
</feed>
Is that even necessary? Wouldn’t @rel='self' already work here?
Regards,