http://phobos.apple.com/static/iTunesRSS.htmlの私訳
iTunes Muisc Store上でPodcastをパブリッシュする方法
最終更新日 2005年7月7日
iTunesのRSSタグ
iTunesではRSS 2.0にいくつかのタグを追加しています。iTunesタグを用いるには、あなたが作成するxmlフィードに以下のような名前空間宣言を追加しなくてはなりません:<rss xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" version="2.0">
xmlフィードのテキストエンコードははUTF-8を用いてください。その他のエンコードを用いても、iTunes上で動作は保証されません。
すべての値はプレーンテキスト(HTMLや、その他のマークアップは不要です)で記述する必要があります。値は255文字に制限されていますが、<itunes:summary>については、4000文字まで記述が可能です。値の中の空白文字は重要です。すなわちiTunesのなかで、この空白は表示されます。なので、値の先頭、または最後に空白文字を加えてはいけません。
以下はチャネル(ポッドキャスト)全体でどのタグが使えるのか、そして、個別のアイテム(エピソード)にどのタグが使えるのかを、iTunesのどの部分にタグの内容が表示されるのかと併せて示したものです。
| xmlタグ | チャネル | アイテム | iTunesのどの部分に表示されるか |
|---|---|---|---|
| <title> | Y | Y | 「ポッドキャスト」欄 |
| <link> | Y | Webサイトへのリンクで、「ポッドキャスト」欄の矢印 | |
| <copyright> | Y | iTunes Music Storeで表示される | |
| <pubdate> | Y | 「リリース日」欄 | |
| <itunes:author> | Y | 「アーティスト」欄 | |
| <itunes:block> | Y | Y | エピソード、またはポッドキャストが表示されるのを防ぐ |
| <itunes:category> | Y | Y | 「カテゴリー」欄と、iTunes Music Storeをブラウズする際に用いられる |
| <itunes:duration> | Y | 「時間」欄 | |
| <itunes:explicit> | Y | Y | 「ポッドキャスト」欄に、ペアレンタルアドバイザリーマーク(囲まれたEXPLICITマーク)として表示 |
| <itunes:keywords> | Y | Y | 表示されないが、検索で用いられる |
| <itunes:owner> | Y | 表示されないで、コンタクトを取る際のみに用いられる | |
| <itunes:subtitle> | Y | Y | 「説明」欄に表示 |
| <itunes:summary> | Y | Y | 「説明」欄の丸で囲まれた「i」をクリックした際に表示 |
iTunesで用いられるタグの詳細
<enclosure>このタグのurl属性のファイル拡張子によって、アイテム(エピソード)がポッドキャストディレクトリに表示されるかどうかを決定されます。サポートされている拡張子は、m4a,mp3,mov,mp4,pdfです。
<guid>
各 <item> は決して変更しないユニークな識別子を持たなくてはいけません。あなたのフィードにエピソードを加える際、どのエピソードが新しいかを決めるために、guidは用いられます。 もし、エピソードからguidを省いた場合、エピソードのurlが変わりに用いられます。
<itunes:author>
このタグの値はiTunesの「アーティスト」ランに表示されます。
<itunes:block>
このタグを<item>の内側で用いるとiTunesのポッドキャストディレクトリにエピソードが表示されないようになります。
<itunes:category>
iTunes Music Storeでポッドキャストをブラウズする際に、カテゴリーは2列目に表示され、サブカテゴリーは3列目に表示されます。必ずサブカテゴリーを持たなくてはいけないわけではありません。
ブラウズの際のカテゴリーを特定するためには、最上層で<itunes:category>を用います。入れ子になった<itunes:category>は、サブカテゴリーを特定するために用いられます。iTunes Music Store上で存在しているカテゴリー、サブカテゴリーを選択します。
もし入れ子になった<itunes:category>が存在した場合、iTunesはそれを「カテゴリー」欄で表示します。そうでない場合は、iTunesは最上層の<itunes:category>を「カテゴリー」欄で表示します。
<itunes:duration>
このタグの値は、iTunesの「時間」欄に表示されます。
タグの値は、HH:MM:SS、H:MM:SS、MM:SSまたはM:SSの形で整形されていなくてなりません。 (H = 時、M = 分, S = 秒)
<itunes:explicit>
このタグは、あなたのpodcastに、露骨で卑猥な表現や要素があるかどうかを示すために用いられます。
値には「yes」もしくは「no」を指定します。
値に「yes」を指定すると、iTunes Music Storeのアートワーク画像とiTunesの「ポッドキャスト」欄に、(保護者として)忠告を促すマークが表示されます。
<itunes:keywords>
このタグに記述された値でユーザがキーワード検索ができるようになります。
キーワードの区切りは空白文字を用います。
<itunes:image>
このタグでポッドキャストのアートワークを特定します。href属性に画像へのURLを記述します。
最低でも300x300ピクセルの正方形のイメージを用意したほうがよいでしょう。そして、このイメージはRSS標準のimageタグで定義されるものとは別のものです。それゆえカスタムタグを用います。
iTunesではJPEGとPNGフォーマットのイメージをサポートします。urlの最後は「.jpg」「.png」でなくてはなりません。
<itunes:owner>
このタグには、ポッドキャストのオーナーとコンタクトをとるための(特にコミュニケーションをとるための)情報を記述します。公開される画面上には表示されません。
オーナーのemailアドレスを<itunes:owner>内に入れ子にした<itunes:email>タグを使って記述します。
同様にオーナー名も<itunes:name>タグを入れ子にして記載します。
<itunes:subtitle>
このタグの値は、iTunesの説明欄に表示されます。値自体は、簡潔な一文程度が良いでしょう。
(訳注)「a few words long」ということで、数単語程度が直訳と思われますが、日本語で言えば「簡潔な一文」程度か。
<itunes:summary>
このタグの値は、iTunesの説明欄内の「i(丸で囲まれたi)」マークをクリックした際にポップアップされるウインドウに表示されます。
iTunes Music Storeにおいても、あなたのポッドキャストページに表示されます。記述は4000字が上限です。
iTunesタグを含んだRSS 2.0フィードの例
<?xml version="1.0" encoding="UTF-8"?>
<!-- must include xmlns:itunes tag -->
<rss xmlns:itunes="http://example.com/DTDs/Podcast-1.0.dtd" version="2.0">
<channel>
<title>All About Everything</title>
<itunes:author>John Doe</itunes:author>
<link>http://example.com/podcasts/everything/index.html</link>
<itunes:subtitle>A show about everything</itunes:subtitle>
<itunes:summary>All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our Podcast in the iTunes Music Store</itunes:summary>
<language>en-us</language>
<copyright>℗ & © 2005 John Doe & Family</copyright>
<itunes:owner>
<itunes:name>John Doe</itunes:name>
<itunes:email>john.doe@example.com</itunes:email>
</itunes:owner>
<!-- iTunes prefers square images 300x300 pixels or larger -->
<itunes:image href="http://example.com/podcasts/everything/AllAboutEverything.jpg" />
<!-- iTunes Browse Podcasts Category -->
<itunes:category text="Technology">
<!-- iTunes Browse Podcasts Subcategory -->
<itunes:category text="Gadgets"/>
</itunes:category>
<item>
<title>Shake Shake Shake Your Spices</title>
<itunes:author>John Doe</itunes:author>
<itunes:subtitle>A short primer on table spices</itunes:subtitle>
<itunes:summary>This week we talk about salt and pepper shakers, comparing and contrasting pour rates, construction materials, and overall aesthetics. Come and join the party!</itunes:summary>
<enclosure url="http://example.com/podcasts/everything/AllAboutEverythingEpisode3.m4a" length="8727310" type="audio/x-m4a" />
<guid>http://example.com/podcasts/archive/aae20050615.m4a</guid>
<pubDate>Wed, 15 Jun 2005 19:00:00 GMT</pubDate>
<itunes:category text="Food">
<itunes:duration>7:04</itunes:duration>
<itunes:keywords>salt pepper shaker exciting</itunes:keywords>
</item>
<item>
<title>Socket Wrench Shootout</title>
<itunes:author>Jane Doe</itunes:author>
<itunes:subtitle>Comparing socket wrenches is fun!</itunes:subtitle>
<itunes:summary>This week we talk about metric vs. old english socket wrenches. Which one is better? Do you really need both? Get all of your answers here.</itunes:summary>
<enclosure url="http://example.com/podcasts/everything/AllAboutEverythingEpisode2.mp3" length="5650889" type="audio/mpeg" />
<guid>http://example.com/podcasts/archive/aae20050608.mp3</guid>
<pubDate>Wed, 8 Jun 2005 19:00:00 GMT</pubDate>
<itunes:category text="Technology">
<itunes:category text="Gadgets"/>
</itunes:category>
<itunes:duration>4:34</itunes:duration>
<itunes:keywords>metric socket wrenches tool</itunes:keywords>
</item>
<item>
<title>Red, Whine, & Blue</title>
<itunes:author>Various</itunes:author>
<itunes:subtitle>Red + Blue != Purple</itunes:subtitle>
<itunes:summary>This week we talk about surviving in a Red state if you're a Blue person. Or vice versa.</itunes:summary>
<enclosure url="http://example.com/podcasts/everything/AllAboutEverythingEpisode1.mp3" length="4989537" type="audio/mpeg" />
<guid>http://example.com/podcasts/archive/aae20050601.mp3</guid>
<pubDate>Wed, 1 Jun 2005 19:00:00 GMT</pubDate>
<itunes:category text="Politics">
<itunes:duration>3:59</itunes:duration>
<itunes:keywords>politics red blue state</itunes:keywords>
</item>
</channel>
</rss>
よくある間違い
- <pubDate>でRFC 2822sで認められていない日付、時間のフォーマットを用いる
- The date must be "day-of-week, day month year".
- The time must be in 24 hour format (no AM or PM) and must include the time zone offset.
<!-- RFC 2822で認められていない日時のフォーマット例 --> <pubDate>7/6/2005 1:00:00 PM</pubDate> <!-- 適切な日時のフォーマットの例 --> <pubDate>Wed, 6 Jul 2005 13:00:00 PDT</pubDate> <pubDate>Wed, 6 Jul 2005 13:00:00 -0700</pubDate>
- アンパサンド(&)をエスケープするのを忘れる
<!-- 不正なxml --> <title>Food & Wine</title> <!-- 適切なxml --> <title>Food & Wine</title>
- HTMLで定義された文字実態参照を用いる
<!-- 不正なxml --> <copyright>© 2005 John Doe</copyright> <!-- 適切なxml --> <copyright>© 2005 John Doe</copyright>
HTMLとは異なり、XMLでサポートされている「文字実態参照」は5つだけです。:
文字列 名前 xml & アンパサンド & < 小なり < > 大なり > ' アポストロフィ ' " クォーテーション "quot;
以上の5文字のみがXMLでエスケープしなくてはならない文字です。その他の文字列はUTF-8をサポートするテキストエディタで入力できます。また、ユニコードで決められている数値実態参照を用いることができます。例えば
character name xml © コピーライト記号 © ℗1 sound recording copyright ℗ ™ トレードマーク記号 ™ 1.訳注:○にPの文字。WindowsIEでは表示されません。
XMLでの実態参照についてより詳しくはこちら。