|
本ページは、技術者向けの情報です。詳細についてのご質問にはお答えできません。 |
RSSチャンネルは、RSS 2.0、及び"Media RSS"に準拠したRSSドキュメントを読み込み、表示します。以下に、RSSチャンネルが扱うRSSドキュメントの仕様の詳細を示します。
◆ 文字コード
UTF-8のみをサポートします。
◆ テキストフォーマット
すべてのタグ内のキャラクタデータはプレーンテキストであるべきです。HTMLやそのほかのマークアップ言語が使われていても、そのままキャラクタデータとして処理されます。
◆ 文字数制限
タグの値の長さの上限はXMLタグによって異なります。詳細は以下のとおりです。
| XMLタグ | 最大サイズ | 最大文字数(文字) | 対応システム |
|---|---|---|---|
| <title> | 768 | 256 | 2.60以降 |
| <description> | 1020 | 340 | 2.60以降 |
| <copyright> | 768 | 256 | 2.60以降 |
| <link> | 256 | 256 | 3.10以降 |
| <author> | 768 | 256 | 2.60以降 |
| <url> | 256 | 256 | 2.60以降 |
| <pubDate> | 64 | 64 | 2.60以降 |
値の長さが最大サイズまたは最大文字数を超えた場合、その値がキャラクタデータであれば超過部分が"…"と省略して表示されます。その値が内部処理用のデータであれば、無効値として扱われます。
◆ 各タグ情報の表示
各XMLタグが<channel>タグおよび<item>タグに適用されるかどうかと、どの画面に表示されるかを以下に示します。
| XMLタグ | <channel> | <item> | 表示される画面 | 対応システム |
|---|---|---|---|---|
| <title> | ○ | ○ | "XMB"のチャンネルリスト チャンネルの情報画面 アイテムの情報画面 |
2.60以降 |
| <description> | ○ | ○ | チャンネルの情報画面 アイテムの情報画面 |
2.60以降 |
| <copyright> | ○ | - | チャンネルの情報画面 | 2.60以降 |
| <link> | ○ | - | チャンネルの情報画面 | 3.10以降 |
| <author> | - | ○ | アイテムの情報画面 | 2.60以降 |
| <enclosure> (url属性) |
- | ○ | アイテムの情報画面 | 2.60以降 |
| <pubDate> | - | ○ | "XMB"のチャンネルリスト アイテムの情報画面 |
2.60以降 |
| <media:content> (url属性) |
- | ○ | アイテムの情報画面 | 3.30以降 |
◆ アイテムの抽出条件
各アイテムは、<enclosure>の属性と<pubDate>の値によって、抽出されるかどうかが決定されます。一つのチャンネルに複数のフォーマット種別を含むことが可能です。
(1)<enclosure>/<media:content>の属性
url属性の値の拡張子と、type属性のMIME typeのいずれかがサポートされているものであれば、そのアイテムはRSSチャンネルのアイテムリストに表示されます。サポートされている拡張子およびMIME typeを以下に示します。
| type属性値のMIME type | url属性値の拡張子 | フォーマット種別 | 対応システム |
|---|---|---|---|
| audio/mp3 | - | 音声:MP3 | 2.60以降 |
| audio/x-mp3 | - | 音声:MP3 | 2.60以降 |
| x-audio/mp3 | - | 音声:MP3 | 2.60以降 |
| audio/aac | - | 音声:MP4(AAC) | 2.60以降 |
| audio/x-aac | - | 音声:MP4(AAC) | 2.60以降 |
| x-audio/aac | - | 音声:MP4(AAC) | 2.60以降 |
| audio/m4a | - | 音声:MP4(AAC) | 2.60以降 |
| audio/x-m4a | - | 音声:MP4(AAC) | 2.60以降 |
| x-audio/m4a | - | 音声:MP4(AAC) | 2.60以降 |
| audio/mp4 | - | 音声:MP4(AAC) | 2.60以降 |
| audio/x-mp4 | - | 音声:MP4(AAC) | 2.60以降 |
| x-audio/mp4 | - | 音声:MP4(AAC) | 2.60以降 |
| video/mp4 | - | 動画:MP4 | 2.80以降 |
| video/x-mp4 | - | 動画:MP4 | 2.80以降 |
| x-video/mp4 | - | 動画:MP4 | 2.80以降 |
| video/m4v | - | 動画:MP4 | 2.80以降 |
| video/x-m4v | - | 動画:MP4 | 2.80以降 |
| x-video/m4v | - | 動画:MP4 | 2.80以降 |
| video/avi | - | 動画:AVI(Motion JPEG) | 3.00以降 |
| video/x-avi | - | 動画:AVI(Motion JPEG) | 3.00以降 |
| x-video/avi | - | 動画:AVI(Motion JPEG) | 3.00以降 |
| image/jpeg | - | 静止画:JPG | 2.80以降 |
| image/gif | - | 静止画:GIF | 2.80以降 |
| image/png | - | 静止画:PNG | 2.80以降 |
| image/tiff | - | 静止画:TIFF | 2.80以降 |
| image/bmp | - | 静止画:BMP | 2.80以降 |
| - | mp3 | 音声:MP3 | 2.60以降 |
| - | mp4 | 音声:MP4(AAC) | 2.60, 2.70, 2.71 |
| - | m4a | 音声:MP4(AAC) | 2.70以降 |
| - | mp4 | 動画:MP4 | 2.80以降 |
| - | m4v | 動画:MP4 | 2.80以降 |
| - | avi | 動画:AVI(Motion JPEG) | 3.00以降 |
| - | jpeg | 静止画:JPG | 2.80以降 |
| - | jpg | 静止画:JPG | 2.80以降 |
| - | gif | 静止画:GIF | 2.80以降 |
| - | png | 静止画:PNG | 2.80以降 |
| - | tiff | 静止画:TIFF | 2.80以降 |
| - | tif | 静止画:TIFF | 2.80以降 |
| - | bmp | 静止画:BMP | 2.80以降 |
| audio/mpeg | - | 音声:MP3 | 2.60以降 |
| audio/x-mpeg | - | 音声:MP3 | 2.60以降 |
| x-audio/mpeg | - | 音声:MP3 | 2.60以降 |
| audio/mpg | - | 音声:MP3 | 2.60以降 |
| audio/x-mpg | - | 音声:MP3 | 2.60以降 |
| x-audio/mpg | - | 音声:MP3 | 2.60以降 |
| audio/mpegurl | - | 音声:MP3 | 2.60以降 |
| audio/x-mpegurl | - | 音声:MP3 | 2.60以降 |
| x-audio/mpegurl | - | 音声:MP3 | 2.60以降 |
| video/mpeg | - | 動画:MP4 | 2.80以降 |
| video/x-mpeg | - | 動画:MP4 | 2.80以降 |
| x-video/mpeg | - | 動画:MP4 | 2.80以降 |
一つの<item>要素内に<enclosure>要素と<media:content>要素が存在したときの優先順位
<enclosure>要素を優先し、<media:content>要素を無視します。
一つの<item>要素内に複数の<enclosure>/<media:content>要素が存在したときの優先順位
対応システム:2.60, 2.70, 2.71, 2.80, 2.81, 2.82
抽出条件を満たす最初の<enclosure>要素が一つ抽出されます。
対応システム:3.00以降
上記の表を優先順位として、最も高い優先順位の<enclosure>要素が一つ抽出されます。
(2)<pubDate>の値
pubDateタグの値は、各アイテムがRSSチャンネルのアイテムリストに表示される順序を決めます。最新の100アイテムが、逆時系列順にアイテムリストに表示されます。
正当なpubDateの値を持たないアイテムは表示されません。
◆ アイテムの視聴・閲覧(保存前)
以下に、フォーマット種別と、視聴・閲覧(保存前)の可否を記述します。
| フォーマット種別 | 視聴・閲覧(保存前)の可否 | 対応システム |
|---|---|---|
| 音声:MP3 | ○ | 2.60以降 |
| 音声:MP4(AAC) | ○ | 2.60以降 |
| 動画:MP4 | × | - |
| 動画:AVI(Motion JPEG) | × | - |
| 静止画:GIF | ○ | 3.80以降 |
| 静止画:JPEG | ○ | 3.80以降 |
| 静止画:PNG | ○ | 3.80以降 |
| 静止画:BMP | ○ | 3.80以降 |
| 静止画:TIFF | ○ | 3.80以降 |
◆ アイテムの視聴・閲覧(保存後)
以下に、フォーマット種別と、視聴・閲覧(保存後)の可否を記述します。
| フォーマット種別 | 視聴・閲覧(保存後)の可否 | 対応システム |
|---|---|---|
| 音声:MP3 | ○ | 2.70以降 |
| 音声:MP4(AAC) | ○ | 2.70以降 |
| 動画:MP4 | ○ | 2.80以降 |
| 動画:AVI(Motion JPEG) | ○ | 3.00以降 |
| 静止画:GIF | ○ | 2.80以降 |
| 静止画:JPEG | ○ | 2.80以降 |
| 静止画:PNG | ○ | 2.80以降 |
| 静止画:BMP | ○ | 2.80以降 |
| 静止画:TIFF | ○ | 2.80以降 |
◆ アイテムの保存先フォルダ名/ファイル名
以下に、保存フォーマット種別と保存先フォルダ名/ファイル名の関係を記述します。
| フォーマット種別 | フォルダ生成位置 | フォルダ名 | ファイル名 | 拡張子 | 対応システム |
|---|---|---|---|---|---|
| 音声:MP3 | /PSP/MUSIC | ※1 | ※2 | mp3 | 2.70, 2.71 |
| 音声:MP4(AAC) | /PSP/MUSIC | ※1 | ※2 | mp4 | 2.70, 2.71 |
| 音声:MP3 | /MUSIC | ※1 | ※2 | mp3 | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 音声:MP4(AAC) | /MUSIC | ※1 | ※2 | mp4 | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 動画:MP4 | /VIDEO | ※1 | ※2 | mp4 | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 動画:AVI(Motion JPEG) | /VIDEO | ※1 | ※2 | avi | 3.00, 3.01, 3.02, 3.03 |
| 静止画:GIF | /PICTURE | ※1 | ※2 | gif | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 静止画:JPEG | /PICTURE | ※1 | ※2 | jpg | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 静止画:PNG | /PICTURE | ※1 | ※2 | png | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 静止画:BMP | /PICTURE | ※1 | ※2 | bmp | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 静止画:TIFF | /PICTURE | ※1 | ※2 | tif | 2.80, 2.81, 3.00, 3.01, 3.02, 3.03 |
| 音声:MP3 | /MUSIC | ※1 | ※3 | mp3 | 3.10以降 |
| 音声:MP4(AAC) | /MUSIC | ※1 | ※3 | mp4 | 3.10以降 |
| 動画:MP4 | /VIDEO | ※1 | ※3 | mp4 | 3.10以降 |
| 動画:AVI(Motion JPEG) | /VIDEO | ※1 | ※3 | avi | 3.10以降 |
| 静止画:GIF | /PICTURE | ※1 | ※3 | gif | 3.10以降 |
| 静止画:JPEG | /PICTURE | ※1 | ※3 | jpg | 3.10以降 |
| 静止画:PNG | /PICTURE | ※1 | ※3 | png | 3.10以降 |
| 静止画:BMP | /PICTURE | ※1 | ※3 | bmp | 3.10以降 |
| 静止画:TIFF | /PICTURE | ※1 | ※3 | tif | 3.10以降 |
| ※1 | "[RSS] "という文字列の後に<channel>要素内<title>要素の値を付与した文字列がフォルダ名となります。 |
| ※2 | <enclosure>要素のurl属性値内ファイル名に準じたファイル名となります。複数のアイテムのファイル名が同じとき、ダウンロードできないアイテムが発生するので注意が必要です。 |
| ※3 | <item>要素内<title>要素の値に準じた文字列がファイル名となります。複数のアイテムのファイル名が同じとき、ダウンロードできないアイテムが発生するので注意が必要です。 |
◆ チャンネルのサムネイルイメージ
<image>タグの情報は、チャンネルのアイコンとして使用されます。
url属性値のイメージファイルが、チャンネルリストに表示されるチャンネルサムネイルイメージとして使われます。サポートされているイメージのコーデックは次のとおりです。
- GIF
- JPEG
- PNG
- TIFF
- BMP
イメージファイルのサイズは200KB以内である必要があります。
デコードされたイメージのサイズは縦横ともに720pixel以下である必要があります。
◆ アイテムのサムネイルイメージ
対応システム:3.30以降
<media:thumbnail>タグのurl属性に記述されたファイルは、アイテムのアイコンとして使用されます。width属性値は、160以下、height属性値は120以下である必要があります。
url属性値のイメージファイルが、アイテムリストに表示されるチャンネルサムネイルイメージとして使われます。サポートされているイメージのコーデックは次のとおりです。
- JPEG
イメージファイルのサイズは200KB以内である必要があります。
デコードされたイメージのサイズは縦160pixel以下、横120pixel以下である必要があります。
◆ XMLエンティティ
XMLにおいて次の5つの文字は特別な意味を持つため、キャラクタデータ中では該当するXMLエンティティに置き換えて記述する必要があります(Extensible Markup Language (XML) 1.0 (Third Edition) :4.6 Predefined Entitiesで定義されています)。
| 文字 | 名前 | XMLエンティティ |
|---|---|---|
| & | ampersand | & |
| < | less-than sign | < |
| > | greater-than sign | > |
| ' | apostrophe | ' |
| " | quotation | " |
他の文字はすべて、UTF-8をサポートするエディタで直接入力することができます。また、文字のUnicodeを特定する数値参照によって記述することもできます。次に例を示します(より詳細な情報はExtensible Markup Language (XML) 1.0 (Third Edition) : Appendices D Expansion of Entity and Character References(Normative)を参照してください)。
| 文字 | 名前 | 数値参照 |
|---|---|---|
| © | copyright sign | © |
| ™ | trade mark sign | ™ |
| ® | registered trademark sign | ® |
◆ RSSドキュメントのサンプル
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Sample Channel</title>
<link>http://www.example.com/</link>
<description>This is sample contents.</description>
<language>en-us</language>
<copyright>(c) 2005 example.com. All rights reserved.</copyright>
<image>
<url>http://www.example.com/xxx/xxx.jpg</url>
<title>Sample Channel</title>
</image>
<item>
<title>Music item 1</title>
<link>http://www.example.com/xxx/</link>
<description> classic music </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 10:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample1.mp3"
length="1500000" type="audio/mp3"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail1.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Music item 2</title>
<link>http://www.example.com/xxx/</link>
<description> classic music </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 11:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample2.m4a"
length="1500000" type="audio/mp4"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail2.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Video item 1</title>
<link>http://www.example.com/xxx/</link>
<description> classic movie </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 12:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample3.mp4"
length="1500000" type="video/m4v"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail3.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Video item 2</title>
<link>http://www.example.com/xxx/</link>
<description> classic movie </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 13:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample4.avi"
length="1500000" type="video/avi"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail4.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Picture item 1</title>
<link>http://www.example.com/xxx/</link>
<description> still picture </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 14:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample5.jpg"
length="500000" type="image/jpeg"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail5.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Picture item 2</title>
<link>http://www.example.com/xxx/</link>
<description> still picture </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 15:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample6.gif"
length="500000" type="image/gif"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail6.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Picture item 3</title>
<link>http://www.example.com/xxx/</link>
<description> still picture </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 16:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample7.png"
length="500000" type="image/png"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail7.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Picture item 4</title>
<link>http://www.example.com/xxx/</link>
<description> still picture </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 17:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample8.tif"
length="500000" type="image/tiff"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail8.jpg"
width="80" height="60"
/>
</item>
<item>
<title>Picture item 5</title>
<link>http://www.example.com/xxx/</link>
<description> still picture </description>
<author>xxx@example.com</author>
<pubDate>Mon, 1 Jan 2005 18:00:00 +0000</pubDate>
<enclosure url="http://www.example.com/xxx/sample9.bmp"
length="500000" type="image/bmp"
/>
<media:thumbnail
url="http://www.example.com/xxx/image/thumbnail9.jpg"
width="80" height="60"
/>
</item>
</channel>
</rss>
◆ 関連ドキュメント
RSSチャンネルはいくつかの標準仕様に準拠または対応しています。それら標準仕様の詳細については、以下に示すドキュメントを参照してください。
URL/URI
[RFC2396] Uniform Resource Identifiers (URI): Generic Syntax
MIME type
[RFC2936] HTTP MIME Type Handler Detection
RSS
RSS 2.0 Specification
http://blogs.law.harvard.edu/tech/rss
Media RSS
"Media RSS" Specification Version 1.1.1
http://search.yahoo.com/mrss
XML
Extensible Markup Language (XML) 1.0 (Third Edition)
W3C Recommendation 04 February 2004
http://www.w3.org/TR/2004/REC-xml-20040204
◆ 商標
"PlayStation"は株式会社ソニー・コンピュータエンタテインメントの登録商標です。
"PSP"は株式会社ソニー・コンピュータエンタテインメントの商標です。
"XMB"はソニー株式会社および株式会社ソニー・コンピュータエンタテインメントの商標です。