-
Notifications
You must be signed in to change notification settings - Fork 4
/
964.txt
165 lines (117 loc) · 6.23 KB
/
964.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
* リンク関係 [CODE(XML)@en[enclosure]] (Atom)
[10] [[リンク関係]] [DFN[[CODE(XML)@en[[[enclosure]]]]]]
([DFN[[CODE(XML URI)[[[http://www.iana.org/assignments/relation/enclosure]]]]]])
は、[CODE(XMLa)@en[[[href]]]] [[属性値]]の [[IRI]] が、[[サイズ]]が大きいかもしれず特別な扱いを要するかもしれない関連[[資源]]を[[識別]]することを表します
[SRC[[[RFC 4287]] 4.2.7.2.]]。
** 関連
[12] [CODE(XMLa)@en[[[length]]]] [[属性]]を同時に指定する[['''べきです''']]
[SRC[[[RFC 4287]] 4.2.7.2.]]。
** 仕様書
- [11] [[RFC 4287]]
-- '''<http://tools.ietf.org/html/rfc4287#section-4.2.7.2>'''
* [CODE(XML)@en[enclosure]] 要素 (RSS)
[1] [[RSS]] の [DFN[[CODE(XMLe)@en[[[enclosure]]]] [[要素]]]]は、
[[項目]]に[[添付]]されている[[媒体物体]]を表します
[SRC@en[[[RSS 2.0]]]]。
:[[要素名]]:[CODE(XMLe)@en[[[enclosure]]]]
:文脈:[CODE(XMLe)@en[[[item]]]] [[要素]]の[[子要素]]として
:[[内容モデル]]:[[空]]
:[[属性]]:
[CODE(XMLa)@en[[[length]]]]、
[CODE(XMLa)@en[[[url]]]]、
[CODE(XMLa)@en[[[type]]]]
仕様書:
-[CITE@en[RSS 2.0 Specification (version 2.0.10)]]
--<http://www.rssboard.org/rss-specification#hrelementsOfLtitemgt>
--<http://www.rssboard.org/rss-specification#ltenclosuregtSubelementOfLtitemgt>
-[CITE@en[RSS Best Practices Profile]] ([TIME[2008-11-21 15:11:45 +09:00]] 版) <http://www.rssboard.org/rss-profile#element-channel-item-enclosure>
** 属性
[2] この[[要素]]には [CODE(XMLa)@en[[[length]]]]、
[CODE(XMLa)@en[[[url]]]]、
[CODE(XMLa)@en[[[type]]]]
の3つの[[属性]]があり、いずれも必須です [SRC@en[[[RSS 2.0]], [[RSS Best Practices Profile]]]]。
** 内容
[5] この[[要素]]の[[内容]]は[[空]]です [SRC@en[[[RSS Best Practices Profile]]]]。
[13] 現実には [[URL]] が[[内容]]にも入っていることがあります。何かとの互換性のためでしょうか。
** 文脈
[6] この[[要素]]は [CODE(XMLe)@en[[[item]]]] [[要素]]内で高々1つ使うことができます。
それが元々の [[RSS 2.0]] の意図でしたが、明記されていませんでした。
[SRC@en[[[RSS Best Practices Profile]]]]
;; この制約、[[RSS Best Practices Profile]] は [CODE(XMLe)@en[[[item]]]] の節で MUST、
[CODE(XMLe)@en[[[enclosure]]]] の項で SHOULD としており、矛盾しています。
** 実装
[7] [[Blogware]], [[Movable Type]], [[WordPress]] では1つの [CODE(XMLe)@en[[[item]]]]
に [CODE(XMLe)@en[[[enclosure]]]] を複数含めることができます。
[[BottomFeeder]], [[FeederReader]], [[NewsGator]], [[Safari]]
は複数の [CODE(XMLe)@en[[[enclosure]]]] に対応しています。[SRC@en[[[RSS Best Practices Profile]]]]
[8] [[Bloglines]], [[FeedDemon]], [[Google Reader]], [[Microsoft Internet Explorer 7]]
は複数の [CODE(XMLe)@en[[[enclosure]]]] に対応していません。
複数に対応していないと、最初のものだけで残りは無視されたり、
自動的に[[ダウンロード]]される場合には最初のものだけで残りは手動で[[ダウンロード]]しなければならなかったりします。
[SRC@en[[[RSS Best Practices Profile]]]]
** 例
[3]
[PRE(XML example code)[
<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />
]PRE]
;; [[RSS 2.0]] 仕様書より
[4]
[PRE(XML example code)[
<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
]PRE]
;; [[RSS Best Practices Profile]] より
[9]
[PRE(XML example code)[
<enclosure url="http://jp.youtube.com/watch?v=iZ97gbsZWYg" type="" length="" />
]PRE]
;; 実利用例より
[14] [CITE@en[RFC 5988 - Web Linking]]
( ([TIME[2012-03-22 09:19:11 +09:00]] 版))
<http://tools.ietf.org/html/rfc5988#page-13>
[FIG(quote)[
[FIGCAPTION[
[15] [CITE@en[RSS tags for Podcasts Connect - Podcasts Connect Help]]
([TIME[2016-03-19 12:10:04 +09:00]] 版)
<https://help.apple.com/itc/podcasts_connect/#/itcb54353390>
]FIGCAPTION]
> The <enclosure> tag has three attributes: URL, length, and type:
> URL. The URL attribute points to your podcast content. The file extension specified within the URL attribute determines whether or note content appears in the podcast directory. Supported file formats include M4A, MP3, MOV, MP4, M4V, PDF, and EPUB.
> Length. The length attribute is the file size in bytes. You can find this information in the properties of your podcast file (on a Mac, choose File > Get Info and refer to the size row).
> Type. The type attribute provides the correct category for the type of file you are using. The type values for the supported file formats are: audio/x-m4a, audio/mpeg, video/quicktime, video/mp4, video/x-m4v, application/pdf, and document/x-epub.
> <enclosure url="http://example.com/podcasts/everything/AllAboutEverythingEpisode2.mp3" length="5650889" type=“audio/mpeg"/>
]FIG]
[FIG(quote)[
[FIGCAPTION[
[16] ([TIME[2016-03-14 12:53:04 +09:00]] 版)
<http://www.tbsradio.jp/tsutaya/index.xml>
]FIGCAPTION]
> <link>http://podcast.tbsradio.jp/tsutaya/files/20160314.mp3</link>
> <guid>http://podcast.tbsradio.jp/tsutaya/files/20160314.mp3</guid>
> <enclosure url="http://podcast.tbsradio.jp/tsutaya/files/20160314.mp3" type="audio/mpeg"/>
]FIG]
[FIG(quote)[
[FIGCAPTION[
[17] ([TIME[2016-03-18 18:35:00 +09:00]] 版)
<http://feedpress.me/automagic>
]FIGCAPTION]
> <link>http://automagic.fm/post/141135511895/magical-remix2</link>
> <enclosure url="http://yhassy.heteml.jp/mp3/automagic161.5.mp3" length="4326236" type="audio/mpeg"/>
]FIG]
[FIG(quote)[
[FIGCAPTION[
[18] ([TIME[2016-03-18 16:49:18 +09:00]] 版)
<http://www.joqr.co.jp/blog/golden-opening/index.xml>
]FIGCAPTION]
>
> <enclosure url="http://podcast.joqr.co.jp/podcast_qr/ootake-opening/ootake-opening160316.mp3" length="15000576" type="audio/mpeg"/>
> ;; [CODE(XMLe)@en[link]] [[要素]]なし。
]FIG]
[FIG(quote)[
[FIGCAPTION[
[19] ([TIME[2016-03-15 11:13:59 +09:00]] 版)
<http://www.nhk.or.jp/lesson/common/rss/podcast/arabic.xml>
]FIGCAPTION]
> <enclosure url="http://www.nhk.or.jp/lesson/arabic/learn/mp3/47-ar-le_01.mp3" length="4801831" type="audio/mpeg"/>
> ;; [CODE(XMLe)@en[link]] [[要素]]なし。
>
]FIG]