atom:link
要素 (Atom 1.0)#✎[79] atom:link
要素はフィードやエントリーから
Web資源への参照を表します
RFC 4287 4.2.7.。
[68] リンク型によっては個数等に制約が課されていることがあります。 以降の各項や各リンク型の項もごらんください。
atom:feed
の子要素として#✎[70] atom:feed
要素は、
rel
属性値が self
である
atom:link
要素を1つ含むべきです。
この要素は、その Atomフィードを含む Atomフィード文書の取り出しに相応しい
URL を表します。 Atom 1.0 4.1.1.
[72] atom:feed
要素は、
rel
属性値が alternate
であって、
type
属性と hreflang
属性の組が同じであるような atom:link
要素を複数含んではなりません。
Atom 1.0 4.1.1.
[73] リンク関係 alternate
の
atom:link
要素は Mobile Link Discovery
のために用いられることもあります。詳しくはそちらの項を参照してください。
[67] 集成フィードが部分リストである場合、最初の部分リストはリンク関係が
link
の atom:link
要素を含まなければなりません。
AtomPub
atom:entry
の子要素として#✎[74] atom:entry
要素が atom:content
要素を含まない場合、 atom:entry
要素は rel
属性が
alternate
の atom:link
要素を最低1つは含まなければなりません
Atom 1.0 4.1.2.。
[78] atom:entry
要素は、
rel
属性値が alternate
であって、
type
属性と hreflang
属性の組が同じであるような atom:link
要素を複数含んではなりません。
Atom 1.0 4.1.2.
[64] 成員エントリーは、リンク関係が edit
であって成員URI を表す atom:link
要素を含めるべきです。
AtomPub
[66] 集成フィードのエントリーはリンク関係が
edit
である atom:link
要素を含めるべきです。
[65] 媒体資源が集成に POST
されて作成される媒体リンク・エントリーは、
リンク関係が edit-media
であって媒体資源IRI
を表す atom:link
要素を含めなければなりません。
AtomPub
[6] エントリー自身の (HTML 版の) URL を表すために、
rel
属性を省略した atom:link
要素が使われることがあります。
at:deleted-entry
の子要素として#✎[97] at:deleted-entry
要素の子要素として任意個の atom:link
要素を使うことができます。 >>96
channel
の子要素として#✎[52] link
要素は
RSS 2.0 channel
要素の子要素として使うことができます。
その場合、 rel
属性は self
でなければなりません。値が application/rss+xml
の type
属性を持っても構いません。
RSS Best Practices Profile
[55] RSS 2.0 フィードは >>52 の link
要素を含めるべきです
RSS Best Practices Profile。
[56] >>55 は、可搬性が向上し、自己完結することとなり、キャッシュも容易になるため、 と説明されています RSS Best Practices Profile。
[51] OGC KML は Atom の link
要素の使用を認めています。
(ただし rel
属性値は
related
に限定されています。)
[80] RFC 4287 はこの要素に内容があったとしてもその意味は定義しないとしています。
RELAX NG スキーマ (参考) 上のデータ型も
undefinedContent
となっています。
RFC 4287 4.2.7.
[9] OPDS は、
opds:price
要素や
opds:indirectAcquisition
要素を (場合により)
子供として認めています >>8。
atom:link href="http://dallas.example.com/rss.xml" rel="self" type="application/rss+xml" /
[57] RSS の enclosure
要素、
link
要素、 source
要素と似ています。
RSS 2.0 フィードにおいては、 RSS の要素と同じ機能を持つ場合、
RSS の方を使うべきです RSS Best Practices Profile。
[58] RSS の link
要素は、局所名は同じですが、
全く違う意味の要素です。
HTML の link
要素は、局所名も意味も構文もだいたい同じですが、
細かな点で違いが沢山あります。
RSS 2.0 文書ではこの3種類の link
要素がすべて同時に現れることもあります(!)。
[83] RFC 5988 Web Linking は、 atom:link
要素と
Link:
欄の変換について言及しています。
[86] atom:link
要素は主に atom:feed
と atom:entry
で使われますが、フィードの方のリンクが主として
Link:
として転送される候補となる >>85、とされています。
[88] href
属性が対象IRIを表し、 rel
属性がリンク関係型を表します。ここで対象IRIは Link:
ヘッダーでは URI に変換する必要があります。 >>85
[89] Atom の拡張関係型は IRI であり、 Web Linking では URI です >>85。しかしこの違いをどうするべきかは明記されていません。
[90] Atom では登録済みリンク関係型も絶対URIとして表すことができますが、
そうでない形に変換するべきです。例えば http://www.iana.org/assignments/relation/self
は self
とするべきです。 >>85 (いつ変換するべきかは明記されていませんが、
Link:
に変換する時、でしょう。)
[91] Atom ではリンク関係型は大文字・小文字区別で比較されますが、 Web Linking では区別されないため、 Atom文書に変換するときは小文字にするべきです >>85。
[93] atom:link
要素の rel
属性は1つしかリンク型を指定できないので、 Web Linking から Atom
に変換するときは複数の atom:link
要素に写像する必要があるかもしれません。
>>85
[94] atom:link
は Link:
にない属性を定義しておりますが、
これも Link:
欄で link-extension
として表現して構いません。 >>85
atom:link
要素 (Atom 0.3)、Link construct (Atom 0.3)#✎[59] Atom 0.3 の atom:link
要素は、
フィードやエントリーに関連付けられた URI を表します Atom 0.3。
atom:link
link
atom:feed
や
atom:entry
の子要素としてhref
, rel
,
title
, type
仕様書:
[60] atom:feed
要素や
atom:entry
要素は最低1つ、
rel
が alternate
の atom:link
要素を含まなければなりません Atom 0.3。
[61]
atom:feed
要素や
atom:entry
要素は
type
が他と同じである
rel
が alternate
の atom:link
要素を複数含んではなりません
Atom 0.3。
[62] atom:link
要素は Link construct
です Atom 0.3。
[63] Link construct は
rel
, href
,
type
, title
の4つの属性を持ちます。
そのうち rel
と href
と type
は必須です。
Atom 0.3
[82] OData Protocol Atom Format ( ( 版)) http://www.odata.org/developers/protocols/atom-format
[99] draft-snell-atompub-link-extensions-09 - Atom Link Extensions ( ( 版)) https://tools.ietf.org/html/draft-snell-atompub-link-extensions-09
<link rel="start" href="http://rss.exblog.jp/rss/exblog/XXX/atom.xml" type="application/rss+xml"/>
[100] Citation Style Language 1.0.1 ( ( 版)) http://citationstyles.org/downloads/specification.html#info
[4] RssFeeds - pubsubhubbub - Support of RSS in PubSubHubbub - A simple, open, webhook based pubsub protocol & open source reference implementation. - Google Project Hosting ( 版) https://code.google.com/p/pubsubhubbub/wiki/RssFeeds
The following attributes SHOULD be included on the link element:
href: URI to the rendition content stream
type: The Media Type of the Rendition
cmisra:renditionKind: The Rendition Kind for the Rendition
<entry>
<link href="http://example.com/mypage" />
[10] favicon は og:image
に相当する、サイトや記事の画像を示すリンク型があってもよさそうなものですが、
現時点で標準的に使われているものはなさそうです。 enclosure
はちょっと違いますし...
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="ja">
<title>不動産速報 一戸建てやマンションなど不動産系2chまとめ</title>
<link rel="alternate" type="text/html" href="http://re2ch.com/" />
<link rel="service.post" type="application/x.atom+xml" href="http://cms.blog.livedoor.com/atom/blog_id=6229316" title="不動産速報 一戸建てやマンションなど不動産系2chまとめ" />
<link rel="hub" href="http://pubsubhubbub.appspot.com" />
<link rel="self" href="http://re2ch.com/atom.xml" />
</channel>
xmlns:georss="http://www.georss.org/georss">
<title>エキサイトブログCAFE</title>
<link rel="alternate" type="text/html" href="http://blog.excite.co.jp/editorcafe" />
<modified>2016-03-12T19:54:09+09:00</modified>
<link type="text/html" rel="alternate" href="https://github.com/github/git-lfs/commits/master"/>
<link type="application/atom+xml" rel="self" href="https://github.com/github/git-lfs/commits/master.atom"/>
[16] atom:link
に type
が指定されている場合、まずその値は text/html
です
(rel
が self
や hub
や、
その他特殊なもの以外)。
それ以外は見かけません。更に、 hreflang
属性の利用例も見当たりません。
<link rel="related" type="application/cap+xml" href="http://earthquake.usgs.gov/earthquakes/catalogs/cap/usc000f1r5"/>
<link rel="alternate" type="text/html" href="http://earthquake.usgs.gov/earthquakes/recenteqsww/Quakes/usc000f1r5.php"/>
...
</entry>
<link rel="alternate" type="text/html" href="http://qiita.com"/>
<link rel="self" type="application/atom+xml" href="http://qiita.com/tags/homebrew/feed"/>
<link rel="related" type="text/html" href="http://www.example.com/" />
<link rel="alternate" type="text/html" href="http://b.hatena.ne.jp/sample/20050407#bookmark-XXXX" />
<link rel="service.edit" type="application/x.atom+xml" href="http://b.hatena.ne.jp/atom/edit/XXXX" title="example.com" />
atom:link href="http://iss.ndl.go.jp/rss/ndlopac/index.xml" rel="self"/
atom:link href="http://iss.ndl.go.jp/pbs/news/" rel="alternate"/
[22] SmartNews は、複数の Atom 1.0 atom:link
要素があるとき、 (rel
属性は無視して)
最後のものをリンク先の URL として採用するようです。
<entry>
<title>朝の進捗確認</title>
<link rel="alternate" href="https://cybozulive.com/1_1/gwSchedule/view?eid=1%3A3909" />
<link rel="edit" href="https://cybozulive.com/1_1/gwSchedule/modify?eid=1%3A3909" />
<link rel="mobile" href="https://cybozulive.com/m/1_1/gwSchedule/view?eid=1%3A3909" />
<link rel="mobile-edit" href="https://cybozulive.com/m/1_1/gwSchedule/modify?eid=1%3A3909" />
<link rel="mobile-delete" href="https://cybozulive.com/m/1_1/gwSchedule/delete?eid=1%3A3909" />
<link rel="reuse" href="https://cybozulive.com/1_1/gwSchedule/add?eid=1%3A3909#scheduleEntryNormal" />
<link rel="mobile-reuse" href="https://cybozulive.com/m/1_1/gwSchedule/normalAdd?eid=1%3A3909" />
In the absence of HTTP Link headers, and if the topic is an XML based feed or an HTML page, subscribers MUST check for embedded link elements.
If the topic is an XML based feed, publishers SHOULD use embedded link elements as described in Appendix B of Web Linking [RFC5988]. Similarly, for HTML pages, publishers SHOULD use embedded link elements as described in Appendix A of Web Linking [RFC5988].
<link>http://times.smartnews.co.jp/</link>
self
」でなければならないのかは不明です。