-
Notifications
You must be signed in to change notification settings - Fork 16
/
rss_2.format.txt
152 lines (98 loc) · 7.34 KB
/
rss_2.format.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
RSS 2.0
VERSION ==> #2.0.1
MIME TYPE ==> #application/rss+xml
HTTP HEADER ==> #Link: <URI>; type="application/rss+xml"; rel="alternate" [S]
#For a resource to point to its RSS feed
#Like any Link [S], can be in HTML too
HTML ==> #Using HTML as STR is possible but it means client will need to parse|render it,
#which might not be done or be cumbersome
LIMITS ==> #None per spec, but clients often limit:
# - number of items
# - value size
/=+===============================+=\
/ : : \
)==: ROOT :==(
\ :_______________________________: /
\=+===============================+=/
<?xml version="1.0"?> #RSS is based on XML 1.0
#Custom elements can be added using XML namespaces
<rss> #Root element
version="2.0"
<channel> #Source of items
#Must be only one.
#Required children: <title>, <description>, <link>
<item> #Child of <channel>
DATE #Conforms to RFC 822
/=+===============================+=\
/ : : \
)==: COMMON :==(
\ :_______________________________: /
\=+===============================+=/
CHANNEL ==> #All those are child of <channel|item|textInput|image>
<title> #STR. Short description
<description> #STR. Long description
#For <item>, can also be the full content
<link> #URI
/=+===============================+=\
/ : : \
)==: CHANNEL :==(
\ :_______________________________: /
\=+===============================+=/
CHANNEL ==> #All those are child of <channel>
<pubDate> #DATE. When channel content last changed
<lastBuildDate> #DATE. When channel was last updated, whether changed or not
<image> #Descriptive image, often .gif|jpg|png
#Required children: <url>, <title>, <link>
<title>
<link> #See above. Should have same values as <channel>'s
<description> #See above
<url> #"URI" of the image
<width> #NUM. Def 88, max 144
<height> #NUM. Def 31, max 400
<category> #STR. Generic custom category.
domain="URI" #URI towards a resource describing available categories
<ttl> #NUM (in secs). How long client should cache.
<language> #STR. Language tag.
<copyright> #STR. Short copyright notice.
<managingEditor> #"EMAIL" of person responsible for content
<webMaster> #"EMAIL" of tech person
<docs> #"URI" pointing to "http://blogs.law.harvard.edu/tech/rss"
<generator> #STR. Program used to generate the feed.
<skipHours> #0-23. GMT.
#Which hours are likely not to create new items, so clients can avoid polling
<skipDays> #Same for week days
<day> #STR among "Monday", etc.
<cloud> #Network information to receive push notifications on new items.
#See online doc for more information
<rating> #PICS rating (technology not used anymore)
<textInput> #Small form / text input to show.
#Required children: all below
#Usually ignored
<title>
<link>
<description>
<name> #Like in an HTML <text>
/=+===============================+=\
/ : : \
)==: ITEM :==(
\ :_______________________________: /
\=+===============================+=/
ITEM ==> #All those are child of <item>
<guid> #STR. Unique identifier, typically an URI
isPermalink="true|false" #Def: true
#Whether URI can be dereferenced.
<pubDate> #DATE. When item was either created or last modified
#Can be a date in the future, in which case clients might ignore item.
<enclosure> #Associated file, e.g. audio|video|image
#Client can [pre]fetch it
#All attributes are required.
url="URL" #
type="MIME" #
length="NUM" #In bytes
<category> #Same as for <channel>
<author> #"EMAIL"
<source> #STR. <channel>'s <title>
url="URI" #<channel>'s <link>. Required
<comments> #URI to the comments page