sitemap_generator 2.2.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/Gemfile +9 -24
  2. data/Gemfile.lock +23 -58
  3. data/README.md +56 -75
  4. data/Rakefile +29 -117
  5. data/VERSION +1 -1
  6. data/lib/sitemap_generator.rb +24 -8
  7. data/lib/sitemap_generator/application.rb +31 -4
  8. data/lib/sitemap_generator/builder.rb +0 -6
  9. data/lib/sitemap_generator/builder/sitemap_file.rb +16 -6
  10. data/lib/sitemap_generator/builder/sitemap_index_file.rb +4 -3
  11. data/lib/sitemap_generator/builder/sitemap_index_url.rb +1 -1
  12. data/lib/sitemap_generator/builder/sitemap_url.rb +6 -8
  13. data/lib/sitemap_generator/core_ext.rb +3 -0
  14. data/lib/sitemap_generator/core_ext/big_decimal.rb +45 -0
  15. data/lib/sitemap_generator/core_ext/numeric.rb +48 -0
  16. data/lib/sitemap_generator/helpers/number_helper.rb +237 -0
  17. data/lib/sitemap_generator/interpreter.rb +1 -1
  18. data/lib/sitemap_generator/link_set.rb +39 -18
  19. data/lib/sitemap_generator/railtie.rb +2 -2
  20. data/lib/sitemap_generator/sitemap_namer.rb +1 -1
  21. data/lib/sitemap_generator/tasks.rb +53 -1
  22. data/lib/sitemap_generator/utilities.rb +107 -1
  23. data/lib/tasks/sitemap_generator_tasks.rake +1 -0
  24. data/spec/blueprint.rb +15 -0
  25. data/spec/files/sitemap.create.rb +12 -0
  26. data/spec/files/sitemap.deprecated.rb +13 -0
  27. data/spec/files/sitemap.groups.rb +37 -0
  28. data/spec/sitemap_generator/application_spec.rb +69 -0
  29. data/spec/sitemap_generator/builder/sitemap_file_spec.rb +77 -0
  30. data/spec/sitemap_generator/builder/sitemap_index_file_spec.rb +38 -0
  31. data/spec/sitemap_generator/builder/sitemap_index_url_spec.rb +16 -0
  32. data/spec/sitemap_generator/builder/sitemap_url_spec.rb +152 -0
  33. data/spec/sitemap_generator/core_ext/bigdecimal_spec.rb +20 -0
  34. data/spec/sitemap_generator/core_ext/numeric_spec.rb +43 -0
  35. data/spec/sitemap_generator/geo_sitemap_spec.rb +30 -0
  36. data/spec/sitemap_generator/helpers/number_helper_spec.rb +191 -0
  37. data/spec/sitemap_generator/interpreter_spec.rb +24 -0
  38. data/spec/sitemap_generator/link_set_spec.rb +606 -0
  39. data/spec/sitemap_generator/news_sitemap_spec.rb +42 -0
  40. data/spec/sitemap_generator/sitemap_generator_spec.rb +232 -0
  41. data/spec/sitemap_generator/sitemap_groups_spec.rb +133 -0
  42. data/spec/sitemap_generator/sitemap_location_spec.rb +124 -0
  43. data/spec/sitemap_generator/sitemap_namer_spec.rb +61 -0
  44. data/spec/sitemap_generator/templates_spec.rb +24 -0
  45. data/spec/sitemap_generator/utilities/existence_spec.rb +26 -0
  46. data/spec/sitemap_generator/utilities/hash_spec.rb +57 -0
  47. data/spec/sitemap_generator/utilities/rounding_spec.rb +31 -0
  48. data/spec/sitemap_generator/utilities_spec.rb +50 -0
  49. data/spec/sitemap_generator/video_sitemap_spec.rb +103 -0
  50. data/spec/spec_helper.rb +20 -0
  51. data/spec/support/file_macros.rb +39 -0
  52. data/spec/support/schemas/siteindex.xsd +73 -0
  53. data/spec/support/schemas/sitemap-geo.xsd +41 -0
  54. data/spec/support/schemas/sitemap-news.xsd +159 -0
  55. data/spec/support/schemas/sitemap-video.xsd +409 -0
  56. data/spec/support/schemas/sitemap.xsd +115 -0
  57. data/spec/support/xml_macros.rb +55 -0
  58. metadata +141 -122
  59. data/tasks/sitemap_generator_tasks.rake +0 -43
@@ -0,0 +1,41 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <xsd:schema
3
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4
+ targetNamespace="http://www.google.com/geo/schemas/sitemap/1.0"
5
+ xmlns="http://www.google.com/geo/schemas/sitemap/1.0"
6
+ elementFormDefault="qualified">
7
+
8
+ <xsd:annotation>
9
+ <xsd:documentation>
10
+ XML Schema for the Geo Sitemap extension. This schema defines the
11
+ Geo-specific elements only; the core Sitemap elements are defined
12
+ separately.
13
+
14
+ Help Center documentation for the Geo Sitemap extension:
15
+
16
+ http://www.google.com/support/webmasters/bin/topic.py?topic=14688
17
+
18
+ Copyright 2010 Google Inc. All Rights Reserved.
19
+ </xsd:documentation>
20
+ </xsd:annotation>
21
+
22
+ <xsd:element name="geo">
23
+ <xsd:complexType>
24
+ <xsd:sequence>
25
+ <xsd:element name="format">
26
+ <xsd:annotation>
27
+ <xsd:documentation>
28
+ Specifies the format of the geo content.
29
+ </xsd:documentation>
30
+ </xsd:annotation>
31
+ <xsd:simpleType>
32
+ <xsd:restriction base="xsd:string">
33
+ <xsd:pattern value="[kK][mM][lL]|[kK][mM][zZ]|[gG][eE][oO][rR][sS][sS]"/>
34
+ </xsd:restriction>
35
+ </xsd:simpleType>
36
+ </xsd:element>
37
+ </xsd:sequence>
38
+ </xsd:complexType>
39
+ </xsd:element>
40
+
41
+ </xsd:schema>
@@ -0,0 +1,159 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema
3
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4
+ targetNamespace="http://www.google.com/schemas/sitemap-news/0.9"
5
+ xmlns="http://www.google.com/schemas/sitemap-news/0.9"
6
+ elementFormDefault="qualified">
7
+
8
+ <xsd:annotation>
9
+ <xsd:documentation>
10
+ XML Schema for the News Sitemap extension. This schema defines the
11
+ News-specific elements only; the core Sitemap elements are defined
12
+ separately.
13
+
14
+ Help Center documentation for the News Sitemap extension:
15
+
16
+ http://www.google.com/support/news_pub/bin/topic.py?topic=11666
17
+
18
+ Copyright 2010 Google Inc. All Rights Reserved.
19
+ </xsd:documentation>
20
+ </xsd:annotation>
21
+
22
+ <xsd:element name="news">
23
+ <xsd:complexType>
24
+ <xsd:sequence>
25
+ <xsd:element name="publication">
26
+ <xsd:annotation>
27
+ <xsd:documentation>
28
+ The publication in which the article appears. Required.
29
+ </xsd:documentation>
30
+ </xsd:annotation>
31
+ <xsd:complexType>
32
+ <xsd:sequence>
33
+ <xsd:element name="name" type="xsd:string">
34
+ <xsd:annotation>
35
+ <xsd:documentation>
36
+ Name of the news publication. It must exactly match
37
+ the name as it appears on your articles in news.google.com,
38
+ omitting any trailing parentheticals.
39
+ For example, if the name appears in Google News as
40
+ "The Example Times (subscription)", you should use
41
+ "The Example Times". Required.
42
+ </xsd:documentation>
43
+ </xsd:annotation>
44
+ </xsd:element>
45
+ <xsd:element name="language">
46
+ <xsd:annotation>
47
+ <xsd:documentation>
48
+ Language of the publication. It should be an
49
+ ISO 639 Language Code (either 2 or 3 letters); see:
50
+ http://www.loc.gov/standards/iso639-2/php/code_list.php
51
+ Exception: For Chinese, please use zh-cn for Simplified
52
+ Chinese or zh-tw for Traditional Chinese. Required.
53
+ </xsd:documentation>
54
+ </xsd:annotation>
55
+ <xsd:simpleType>
56
+ <xsd:restriction base="xsd:string">
57
+ <xsd:pattern value="zh-cn|zh-tw|([a-z]{2,3})"/>
58
+ </xsd:restriction>
59
+ </xsd:simpleType>
60
+ </xsd:element>
61
+ </xsd:sequence>
62
+ </xsd:complexType>
63
+ </xsd:element>
64
+ <xsd:element name="access" minOccurs="0">
65
+ <xsd:annotation>
66
+ <xsd:documentation>
67
+ Accessibility of the article. Required if access is not open,
68
+ otherwise this tag should be omitted.
69
+ </xsd:documentation>
70
+ </xsd:annotation>
71
+ <xsd:simpleType>
72
+ <xsd:restriction base="xsd:string">
73
+ <xsd:enumeration value="Subscription"/>
74
+ <xsd:enumeration value="Registration"/>
75
+ </xsd:restriction>
76
+ </xsd:simpleType>
77
+ </xsd:element>
78
+ <xsd:element name="genres" minOccurs="0">
79
+ <xsd:annotation>
80
+ <xsd:documentation>
81
+ A comma-separated list of properties characterizing the content
82
+ of the article, such as "PressRelease" or "UserGenerated".
83
+ For a list of possible values, see:
84
+ http://www.google.com/support/news_pub/bin/answer.py?answer=93992
85
+ Required if any genres apply to the article, otherwise this tag
86
+ should be omitted.
87
+ </xsd:documentation>
88
+ </xsd:annotation>
89
+ <xsd:simpleType>
90
+ <xsd:restriction base="xsd:string">
91
+ <xsd:pattern value="(PressRelease|Satire|Blog|OpEd|Opinion|UserGenerated)(, *(PressRelease|Satire|Blog|OpEd|Opinion|UserGenerated))*"/>
92
+ </xsd:restriction>
93
+ </xsd:simpleType>
94
+ </xsd:element>
95
+ <xsd:element name="publication_date">
96
+ <xsd:annotation>
97
+ <xsd:documentation>
98
+ Article publication date in W3C format, specifying the complete
99
+ date (YYYY-MM-DD) with optional timestamp. See:
100
+ http://www.w3.org/TR/NOTE-datetime
101
+ Please ensure that you give the original date and time at which
102
+ the article was published on your site; do not give the time
103
+ at which the article was added to your Sitemap. Required.
104
+ </xsd:documentation>
105
+ </xsd:annotation>
106
+ <xsd:simpleType>
107
+ <xsd:union>
108
+ <xsd:simpleType>
109
+ <xsd:restriction base="xsd:date"/>
110
+ </xsd:simpleType>
111
+ <xsd:simpleType>
112
+ <xsd:restriction base="xsd:dateTime"/>
113
+ </xsd:simpleType>
114
+ </xsd:union>
115
+ </xsd:simpleType>
116
+ </xsd:element>
117
+ <xsd:element name="title" type="xsd:string" minOccurs="0">
118
+ <xsd:annotation>
119
+ <xsd:documentation>
120
+ Title of the news article. Optional, but highly recommended.
121
+ Note: The title may be truncated for space reasons when shown
122
+ on Google News.
123
+ </xsd:documentation>
124
+ </xsd:annotation>
125
+ </xsd:element>
126
+ <xsd:element name="keywords" type="xsd:string" minOccurs="0">
127
+ <xsd:annotation>
128
+ <xsd:documentation>
129
+ Comma-separated list of keywords describing the topic of
130
+ the article. Keywords may be drawn from, but are not limited to,
131
+ the list of existing Google News keywords; see:
132
+ http://www.google.com/support/news_pub/bin/answer.py?answer=116037
133
+ Optional.
134
+ </xsd:documentation>
135
+ </xsd:annotation>
136
+ </xsd:element>
137
+ <xsd:element name="stock_tickers" minOccurs="0">
138
+ <xsd:annotation>
139
+ <xsd:documentation>
140
+ Comma-separated list of up to 5 stock tickers of the companies,
141
+ mutual funds, or other financial entities that are the main subject
142
+ of the article. Relevant primarily for business articles.
143
+ Each ticker must be prefixed by the name of its stock exchange,
144
+ and must match its entry in Google Finance.
145
+ For example, "NASDAQ:AMAT" (but not "NASD:AMAT"),
146
+ or "BOM:500325" (but not "BOM:RIL"). Optional.
147
+ </xsd:documentation>
148
+ </xsd:annotation>
149
+ <xsd:simpleType>
150
+ <xsd:restriction base="xsd:string">
151
+ <xsd:pattern value="(\w+:\w+(, *\w+:\w+){0,4})?"/>
152
+ </xsd:restriction>
153
+ </xsd:simpleType>
154
+ </xsd:element>
155
+ </xsd:sequence>
156
+ </xsd:complexType>
157
+ </xsd:element>
158
+
159
+ </xsd:schema>
@@ -0,0 +1,409 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema
3
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4
+ targetNamespace="http://www.google.com/schemas/sitemap-video/1.1"
5
+ xmlns="http://www.google.com/schemas/sitemap-video/1.1"
6
+ elementFormDefault="qualified">
7
+
8
+ <xsd:annotation>
9
+ <xsd:documentation>
10
+ XML Schema for the Video Sitemap extension. This schema defines the
11
+ Video-specific elements only; the core Sitemap elements are defined
12
+ separately.
13
+
14
+ Help Center documentation for the Video Sitemap extension:
15
+
16
+ http://www.google.com/support/webmasters/bin/topic.py?topic=10079
17
+
18
+ Copyright 2010 Google Inc. All Rights Reserved.
19
+ </xsd:documentation>
20
+ </xsd:annotation>
21
+
22
+ <xsd:simpleType name="tYesNo">
23
+ <xsd:annotation>
24
+ <xsd:documentation>
25
+ A value that can be yes or no. Permitted cases are all-lowercase (yes/no),
26
+ all-uppercase (YES/NO) or starting with capital (Yes/No).
27
+ </xsd:documentation>
28
+ </xsd:annotation>
29
+ <xsd:restriction base="xsd:string">
30
+ <xsd:enumeration value="yes"/>
31
+ <xsd:enumeration value="Yes"/>
32
+ <xsd:enumeration value="YES"/>
33
+ <xsd:enumeration value="no"/>
34
+ <xsd:enumeration value="No"/>
35
+ <xsd:enumeration value="NO"/>
36
+ </xsd:restriction>
37
+ </xsd:simpleType>
38
+
39
+ <xsd:simpleType name="tCountryList">
40
+ <xsd:annotation>
41
+ <xsd:documentation>
42
+ Space-separated country codes in ISO 3166 format.
43
+
44
+ Country codes:
45
+ http://www.iso.org/iso/english_country_names_and_code_elements
46
+ </xsd:documentation>
47
+ </xsd:annotation>
48
+ <xsd:restriction base="xsd:string">
49
+ <xsd:pattern value="([A-Z]{2}( +[A-Z]{2})*)?"/>
50
+ </xsd:restriction>
51
+ </xsd:simpleType>
52
+
53
+ <xsd:simpleType name="tNonNegativeDecimal">
54
+ <xsd:restriction base="xsd:decimal">
55
+ <xsd:minInclusive value="0"/>
56
+ </xsd:restriction>
57
+ </xsd:simpleType>
58
+
59
+ <xsd:element name="video">
60
+ <xsd:complexType>
61
+ <xsd:sequence>
62
+ <xsd:element name="thumbnail_loc" type="xsd:anyURI">
63
+ <xsd:annotation>
64
+ <xsd:documentation>
65
+ A URL pointing to the URL for the video thumbnail image file. We can
66
+ accept most image sizes/types but recommend your thumbs are at least
67
+ 120x90 pixels in .jpg, .png, or. gif formats.
68
+ </xsd:documentation>
69
+ </xsd:annotation>
70
+ </xsd:element>
71
+ <xsd:element name="title">
72
+ <xsd:annotation>
73
+ <xsd:documentation>
74
+ The title of the video.
75
+ </xsd:documentation>
76
+ </xsd:annotation>
77
+ <xsd:simpleType>
78
+ <xsd:restriction base="xsd:string">
79
+ <xsd:maxLength value="100"/>
80
+ </xsd:restriction>
81
+ </xsd:simpleType>
82
+ </xsd:element>
83
+ <xsd:element name="description">
84
+ <xsd:annotation>
85
+ <xsd:documentation>
86
+ The description of the video.
87
+ </xsd:documentation>
88
+ </xsd:annotation>
89
+ <xsd:simpleType>
90
+ <xsd:restriction base="xsd:string">
91
+ <xsd:maxLength value="2048"/>
92
+ </xsd:restriction>
93
+ </xsd:simpleType>
94
+ </xsd:element>
95
+ <xsd:element name="content_loc" minOccurs="0" type="xsd:anyURI">
96
+ <xsd:annotation>
97
+ <xsd:documentation>
98
+ At least one of &lt;video:player_loc&gt; and
99
+ &lt;video:content_loc&gt; is required.
100
+
101
+ This should be a .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi,
102
+ .ra, .ram, .rm, .flv, or other video file format, and can be omitted
103
+ if &lt;video:player_loc&gt; is specified. However, because Google
104
+ needs to be able to check that the Flash object is actually a player
105
+ for video (as opposed to some other use of Flash, e.g. games and
106
+ animations), it's helpful to provide both.
107
+ </xsd:documentation>
108
+ </xsd:annotation>
109
+ </xsd:element>
110
+ <xsd:element name="player_loc" minOccurs="0">
111
+ <xsd:annotation>
112
+ <xsd:documentation>
113
+ At least one of &lt;video:player_loc&gt; and
114
+ &lt;video:content_loc&gt; is required.
115
+
116
+ A URL pointing to a Flash player for a specific video. In general,
117
+ this is the information in the src element of an &lt;embed&gt; tag
118
+ and should not be the same as the content of the &lt;loc&gt; tag.
119
+ ​Since each video is uniquely identified by its content URL (the
120
+ location of the actual video file) or, if a content URL is not
121
+ present, a player URL (a URL pointing to a player for the video),
122
+ you must include either the &lt;video:player_loc&gt; or
123
+ &lt;video:content_loc&gt; tags. If these tags are omitted and we
124
+ can't find this information, we'll be unable to index your video.
125
+ </xsd:documentation>
126
+ </xsd:annotation>
127
+ <xsd:complexType>
128
+ <xsd:simpleContent>
129
+ <xsd:extension base="xsd:anyURI">
130
+ <xsd:attribute name="allow_embed" type="tYesNo">
131
+ <xsd:annotation>
132
+ <xsd:documentation>
133
+ Attribute allow_embed specifies whether Google can embed the
134
+ video in search results. Allowed values are "Yes" or "No".
135
+ The default value is "Yes".
136
+ </xsd:documentation>
137
+ </xsd:annotation>
138
+ </xsd:attribute>
139
+ <xsd:attribute name="autoplay" type="xsd:string">
140
+ <xsd:annotation>
141
+ <xsd:documentation>
142
+ User-defined string that Google may append (if appropriate)
143
+ to the flashvars parameter to enable autoplay of the video.
144
+ </xsd:documentation>
145
+ </xsd:annotation>
146
+ </xsd:attribute>
147
+ </xsd:extension>
148
+ </xsd:simpleContent>
149
+ </xsd:complexType>
150
+ </xsd:element>
151
+ <xsd:element name="duration" minOccurs="0">
152
+ <xsd:annotation>
153
+ <xsd:documentation>
154
+ The duration of the video in seconds.
155
+ </xsd:documentation>
156
+ </xsd:annotation>
157
+ <xsd:simpleType>
158
+ <xsd:restriction base="xsd:nonNegativeInteger">
159
+ <xsd:maxInclusive value="28800"/>
160
+ </xsd:restriction>
161
+ </xsd:simpleType>
162
+ </xsd:element>
163
+ <xsd:element name="expiration_date" minOccurs="0">
164
+ <xsd:annotation>
165
+ <xsd:documentation>
166
+ The date after which the video will no longer be available, in
167
+ W3C format. Acceptable values are complete date (YYYY-MM-DD) and
168
+ complete date plus hours, minutes and seconds, and timezone
169
+ (YYYY-MM-DDThh:mm:ss+TZD). For example, 2007-07-16T19:20:30+08:00.
170
+ Don't supply this information if your video does not expire.
171
+ </xsd:documentation>
172
+ </xsd:annotation>
173
+ <xsd:simpleType>
174
+ <xsd:union>
175
+ <xsd:simpleType>
176
+ <xsd:restriction base="xsd:date"/>
177
+ </xsd:simpleType>
178
+ <xsd:simpleType>
179
+ <xsd:restriction base="xsd:dateTime"/>
180
+ </xsd:simpleType>
181
+ </xsd:union>
182
+ </xsd:simpleType>
183
+ </xsd:element>
184
+ <xsd:element name="rating" minOccurs="0">
185
+ <xsd:annotation>
186
+ <xsd:documentation>
187
+ The rating of the video.
188
+ </xsd:documentation>
189
+ </xsd:annotation>
190
+ <xsd:simpleType>
191
+ <xsd:restriction base="xsd:decimal">
192
+ <xsd:minInclusive value="0"/>
193
+ <xsd:maxInclusive value="5"/>
194
+ </xsd:restriction>
195
+ </xsd:simpleType>
196
+ </xsd:element>
197
+ <xsd:element name="content_segment_loc"
198
+ minOccurs="0"
199
+ maxOccurs="unbounded">
200
+ <xsd:annotation>
201
+ <xsd:documentation>
202
+ Use &lt;video:content_segment_loc&gt; only in conjunction with
203
+ &lt;video:player_loc&gt;.
204
+
205
+ If you publish your video as a series of raw videos (for example, if
206
+ you submit a full movie as a continuous series of shorter clips),
207
+ you can use the &lt;video:content_segment_loc&gt; to supply us with
208
+ a series of URLs, in the order in which they should be concatenated
209
+ to recreate the video in its entirety. Each URL should point to a
210
+ .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm,
211
+ .flv, or other video file format. It should not point to any Flash
212
+ content.
213
+ </xsd:documentation>
214
+ </xsd:annotation>
215
+ <xsd:complexType>
216
+ <xsd:simpleContent>
217
+ <xsd:extension base="xsd:anyURI">
218
+ <xsd:attribute name="duration">
219
+ <xsd:annotation>
220
+ <xsd:documentation>
221
+ The duration of the clip in seconds.
222
+ </xsd:documentation>
223
+ </xsd:annotation>
224
+ <xsd:simpleType>
225
+ <xsd:restriction base="xsd:nonNegativeInteger">
226
+ <xsd:maxInclusive value="28800"/>
227
+ </xsd:restriction>
228
+ </xsd:simpleType>
229
+ </xsd:attribute>
230
+ </xsd:extension>
231
+ </xsd:simpleContent>
232
+ </xsd:complexType>
233
+ </xsd:element>
234
+ <xsd:element name="view_count"
235
+ minOccurs="0"
236
+ type="xsd:nonNegativeInteger">
237
+ <xsd:annotation>
238
+ <xsd:documentation>
239
+ The number of times the video has been viewed.
240
+ </xsd:documentation>
241
+ </xsd:annotation>
242
+ </xsd:element>
243
+ <xsd:element name="publication_date" minOccurs="0">
244
+ <xsd:annotation>
245
+ <xsd:documentation>
246
+ The date the video was first published, in W3C format. Acceptable
247
+ values are complete date (YYYY-MM-DD) and complete date plus hours,
248
+ minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD).
249
+ For example, 2007-07-16T19:20:30+08:00.
250
+ </xsd:documentation>
251
+ </xsd:annotation>
252
+ <xsd:simpleType>
253
+ <xsd:union>
254
+ <xsd:simpleType>
255
+ <xsd:restriction base="xsd:date"/>
256
+ </xsd:simpleType>
257
+ <xsd:simpleType>
258
+ <xsd:restriction base="xsd:dateTime"/>
259
+ </xsd:simpleType>
260
+ </xsd:union>
261
+ </xsd:simpleType>
262
+ </xsd:element>
263
+ <xsd:element name="tag" type="xsd:string" minOccurs="0" maxOccurs="32">
264
+ <xsd:annotation>
265
+ <xsd:documentation>
266
+ A tag associated with the video. Tags are generally very short
267
+ descriptions of key concepts associated with a video or piece of
268
+ content. A single video could have several tags, although it might
269
+ belong to only one category. For example, a video about grilling
270
+ food may belong in the Grilling category, but could be tagged
271
+ "steak", "meat", "summer", and "outdoor". Create a new
272
+ &lt;video:tag&gt; element for each tag associated with a video.
273
+ </xsd:documentation>
274
+ </xsd:annotation>
275
+ </xsd:element>
276
+ <xsd:element name="category" minOccurs="0">
277
+ <xsd:annotation>
278
+ <xsd:documentation>
279
+ The video's category. For example, cooking. In general, categories
280
+ are broad groupings of content by subject. For example, a site about
281
+ cooking could have categories for Broiling, Baking, and Grilling.
282
+ </xsd:documentation>
283
+ </xsd:annotation>
284
+ <xsd:simpleType>
285
+ <xsd:restriction base="xsd:string">
286
+ <xsd:maxLength value="256"/>
287
+ </xsd:restriction>
288
+ </xsd:simpleType>
289
+ </xsd:element>
290
+ <xsd:element name="family_friendly" minOccurs="0" type="tYesNo">
291
+ <xsd:annotation>
292
+ <xsd:documentation>
293
+ Whether the video is suitable for viewing by children. No if the
294
+ video should be available only to users with SafeSearch turned off.
295
+ </xsd:documentation>
296
+ </xsd:annotation>
297
+ </xsd:element>
298
+ <xsd:element name="restriction" minOccurs="0">
299
+ <xsd:annotation>
300
+ <xsd:documentation>
301
+ A list of countries where the video may or may not be played.
302
+ If there is no &lt;video:restriction&gt; tag, it is assumed that
303
+ the video can be played in all territories.
304
+ </xsd:documentation>
305
+ </xsd:annotation>
306
+ <xsd:complexType>
307
+ <xsd:simpleContent>
308
+ <xsd:extension base="tCountryList">
309
+ <xsd:attribute name="relationship" use="required">
310
+ <xsd:annotation>
311
+ <xsd:documentation>
312
+ Attribute "relationship" specifies whether the video is
313
+ restricted or permitted for the specified countries.
314
+ </xsd:documentation>
315
+ </xsd:annotation>
316
+ <xsd:simpleType>
317
+ <xsd:restriction base="xsd:string">
318
+ <xsd:enumeration value="allow"/>
319
+ <xsd:enumeration value="deny"/>
320
+ </xsd:restriction>
321
+ </xsd:simpleType>
322
+ </xsd:attribute>
323
+ </xsd:extension>
324
+ </xsd:simpleContent>
325
+ </xsd:complexType>
326
+ </xsd:element>
327
+ <xsd:element name="gallery_loc" minOccurs="0">
328
+ <xsd:annotation>
329
+ <xsd:documentation>
330
+ A link to the gallery (collection of videos) in which this video
331
+ appears.
332
+ </xsd:documentation>
333
+ </xsd:annotation>
334
+ <xsd:complexType>
335
+ <xsd:simpleContent>
336
+ <xsd:extension base="xsd:anyURI">
337
+ <xsd:attribute name="title" type="xsd:string">
338
+ <xsd:annotation>
339
+ <xsd:documentation>
340
+ The title of the gallery.
341
+ </xsd:documentation>
342
+ </xsd:annotation>
343
+ </xsd:attribute>
344
+ </xsd:extension>
345
+ </xsd:simpleContent>
346
+ </xsd:complexType>
347
+ </xsd:element>
348
+ <xsd:element name="price" minOccurs="0" maxOccurs="unbounded">
349
+ <xsd:annotation>
350
+ <xsd:documentation>
351
+ The price to download or view the video. More than one
352
+ &lt;video:price&gt; element can be listed (for example, in order to
353
+ specify various currencies).
354
+ </xsd:documentation>
355
+ </xsd:annotation>
356
+ <xsd:complexType>
357
+ <xsd:simpleContent>
358
+ <xsd:extension base="tNonNegativeDecimal">
359
+ <xsd:attribute name="currency" use="required">
360
+ <xsd:annotation>
361
+ <xsd:documentation>
362
+ The currency in ISO 4217 format.
363
+ </xsd:documentation>
364
+ </xsd:annotation>
365
+ <xsd:simpleType>
366
+ <xsd:restriction base="xsd:string">
367
+ <xsd:pattern value="[A-Z]{3}"/>
368
+ </xsd:restriction>
369
+ </xsd:simpleType>
370
+ </xsd:attribute>
371
+ </xsd:extension>
372
+ </xsd:simpleContent>
373
+ </xsd:complexType>
374
+ </xsd:element>
375
+ <xsd:element name="requires_subscription" minOccurs="0" type="tYesNo">
376
+ <xsd:annotation>
377
+ <xsd:documentation>
378
+ Indicates whether a subscription (either paid or free) is required
379
+ to view the video.
380
+ </xsd:documentation>
381
+ </xsd:annotation>
382
+ </xsd:element>
383
+ <xsd:element name="uploader" minOccurs="0">
384
+ <xsd:annotation>
385
+ <xsd:documentation>
386
+ A name or handle of the video’s uploader.
387
+ </xsd:documentation>
388
+ </xsd:annotation>
389
+ <xsd:complexType>
390
+ <xsd:simpleContent>
391
+ <xsd:extension base="xsd:string">
392
+ <xsd:attribute name="info" type="xsd:anyURI">
393
+ <xsd:annotation>
394
+ <xsd:documentation>
395
+ The URL of a webpage with additional information about this
396
+ uploader. This URL must be on the same domain as the
397
+ &lt;loc&gt; tag.
398
+ </xsd:documentation>
399
+ </xsd:annotation>
400
+ </xsd:attribute>
401
+ </xsd:extension>
402
+ </xsd:simpleContent>
403
+ </xsd:complexType>
404
+ </xsd:element>
405
+ </xsd:sequence>
406
+ </xsd:complexType>
407
+ </xsd:element>
408
+
409
+ </xsd:schema>