ftbpro_sitemap_generator 5.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +13 -0
  3. data/Gemfile.lock +35 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +1139 -0
  6. data/Rakefile +43 -0
  7. data/VERSION +1 -0
  8. data/lib/capistrano/sitemap_generator.rb +1 -0
  9. data/lib/capistrano/tasks/sitemap_generator.cap +36 -0
  10. data/lib/sitemap_generator.rb +85 -0
  11. data/lib/sitemap_generator/adapters.rb +0 -0
  12. data/lib/sitemap_generator/adapters/file_adapter.rb +43 -0
  13. data/lib/sitemap_generator/adapters/fog_adapter.rb +28 -0
  14. data/lib/sitemap_generator/adapters/s3_adapter.rb +41 -0
  15. data/lib/sitemap_generator/adapters/wave_adapter.rb +21 -0
  16. data/lib/sitemap_generator/application.rb +49 -0
  17. data/lib/sitemap_generator/builder.rb +8 -0
  18. data/lib/sitemap_generator/builder/sitemap_file.rb +172 -0
  19. data/lib/sitemap_generator/builder/sitemap_index_file.rb +149 -0
  20. data/lib/sitemap_generator/builder/sitemap_index_url.rb +28 -0
  21. data/lib/sitemap_generator/builder/sitemap_url.rb +250 -0
  22. data/lib/sitemap_generator/core_ext.rb +3 -0
  23. data/lib/sitemap_generator/core_ext/big_decimal.rb +45 -0
  24. data/lib/sitemap_generator/core_ext/numeric.rb +48 -0
  25. data/lib/sitemap_generator/helpers/number_helper.rb +237 -0
  26. data/lib/sitemap_generator/interpreter.rb +80 -0
  27. data/lib/sitemap_generator/link_set.rb +677 -0
  28. data/lib/sitemap_generator/railtie.rb +7 -0
  29. data/lib/sitemap_generator/sitemap_location.rb +192 -0
  30. data/lib/sitemap_generator/sitemap_namer.rb +75 -0
  31. data/lib/sitemap_generator/tasks.rb +53 -0
  32. data/lib/sitemap_generator/templates.rb +41 -0
  33. data/lib/sitemap_generator/utilities.rb +181 -0
  34. data/lib/tasks/sitemap_generator_tasks.rake +1 -0
  35. data/rails/install.rb +2 -0
  36. data/rails/uninstall.rb +2 -0
  37. data/spec/blueprint.rb +15 -0
  38. data/spec/files/sitemap.create.rb +12 -0
  39. data/spec/files/sitemap.groups.rb +49 -0
  40. data/spec/sitemap_generator/adapters/s3_adapter_spec.rb +23 -0
  41. data/spec/sitemap_generator/alternate_sitemap_spec.rb +79 -0
  42. data/spec/sitemap_generator/application_spec.rb +69 -0
  43. data/spec/sitemap_generator/builder/sitemap_file_spec.rb +110 -0
  44. data/spec/sitemap_generator/builder/sitemap_index_file_spec.rb +124 -0
  45. data/spec/sitemap_generator/builder/sitemap_index_url_spec.rb +28 -0
  46. data/spec/sitemap_generator/builder/sitemap_url_spec.rb +186 -0
  47. data/spec/sitemap_generator/core_ext/bigdecimal_spec.rb +20 -0
  48. data/spec/sitemap_generator/core_ext/numeric_spec.rb +43 -0
  49. data/spec/sitemap_generator/file_adaptor_spec.rb +20 -0
  50. data/spec/sitemap_generator/geo_sitemap_spec.rb +30 -0
  51. data/spec/sitemap_generator/helpers/number_helper_spec.rb +196 -0
  52. data/spec/sitemap_generator/interpreter_spec.rb +90 -0
  53. data/spec/sitemap_generator/link_set_spec.rb +864 -0
  54. data/spec/sitemap_generator/mobile_sitemap_spec.rb +27 -0
  55. data/spec/sitemap_generator/news_sitemap_spec.rb +42 -0
  56. data/spec/sitemap_generator/pagemap_sitemap_spec.rb +57 -0
  57. data/spec/sitemap_generator/sitemap_generator_spec.rb +582 -0
  58. data/spec/sitemap_generator/sitemap_groups_spec.rb +144 -0
  59. data/spec/sitemap_generator/sitemap_location_spec.rb +210 -0
  60. data/spec/sitemap_generator/sitemap_namer_spec.rb +96 -0
  61. data/spec/sitemap_generator/templates_spec.rb +24 -0
  62. data/spec/sitemap_generator/utilities/existence_spec.rb +26 -0
  63. data/spec/sitemap_generator/utilities/hash_spec.rb +57 -0
  64. data/spec/sitemap_generator/utilities/rounding_spec.rb +31 -0
  65. data/spec/sitemap_generator/utilities_spec.rb +101 -0
  66. data/spec/sitemap_generator/video_sitemap_spec.rb +117 -0
  67. data/spec/spec_helper.rb +24 -0
  68. data/spec/support/file_macros.rb +39 -0
  69. data/spec/support/schemas/siteindex.xsd +73 -0
  70. data/spec/support/schemas/sitemap-geo.xsd +41 -0
  71. data/spec/support/schemas/sitemap-mobile.xsd +32 -0
  72. data/spec/support/schemas/sitemap-news.xsd +159 -0
  73. data/spec/support/schemas/sitemap-pagemap.xsd +97 -0
  74. data/spec/support/schemas/sitemap-video.xsd +643 -0
  75. data/spec/support/schemas/sitemap.xsd +115 -0
  76. data/spec/support/xml_macros.rb +67 -0
  77. data/templates/sitemap.rb +27 -0
  78. metadata +226 -0
@@ -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,32 @@
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-mobile/1.0"
5
+ xmlns="http://www.google.com/schemas/sitemap-mobile/1.0"
6
+ elementFormDefault="qualified">
7
+
8
+ <xsd:annotation>
9
+ <xsd:documentation>
10
+ XML Schema for the Mobile Sitemap extension. This schema defines the
11
+ Mobile-specific elements only; the core Sitemap elements are defined
12
+ separately.
13
+
14
+ Help Center documentation for the Mobile Sitemap extension:
15
+
16
+ http://www.google.com/support/webmasters/bin/topic.py?topic=8493
17
+
18
+ Copyright 2010 Google Inc. All Rights Reserved.
19
+ </xsd:documentation>
20
+ </xsd:annotation>
21
+
22
+ <xsd:element name="mobile">
23
+ <xsd:annotation>
24
+ <xsd:documentation>
25
+ Mobile sitemaps just contain an empty "mobile" tag to identify a
26
+ URL as having mobile content.
27
+ </xsd:documentation>
28
+ </xsd:annotation>
29
+ <xsd:complexType/>
30
+ </xsd:element>
31
+
32
+ </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,97 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <xsd:schema
4
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5
+ targetNamespace="http://www.google.com/schemas/sitemap-pagemap/1.0"
6
+ xmlns="http://www.google.com/schemas/sitemap-pagemap/1.0"
7
+ elementFormDefault="qualified">
8
+
9
+ <xsd:annotation>
10
+ <xsd:documentation>
11
+ XML Schema for the PageMap Sitemap extension. This schema defines the
12
+ PageMap-specific elements only; the core Sitemap elements are defined
13
+ separately.
14
+
15
+ Copyright 2011 Google Inc. All Rights Reserved.
16
+ </xsd:documentation>
17
+ </xsd:annotation>
18
+
19
+ <xsd:element name="PageMap">
20
+ <xsd:complexType>
21
+ <xsd:sequence>
22
+ <xsd:element name="Template" minOccurs="0">
23
+ <xsd:annotation>
24
+ <xsd:documentation>
25
+ Template file specification. Can be used for overriding the
26
+ default rendering of search results delivered via
27
+ Google Custom Search Engine.
28
+ </xsd:documentation>
29
+ </xsd:annotation>
30
+ <xsd:complexType>
31
+ <xsd:attribute name="src" type="xsd:anyURI" use="required">
32
+ <xsd:annotation>
33
+ <xsd:documentation>
34
+ Reference to a template file. A template file contains a set of
35
+ ResultSpecs, which, given DataObjects of appropriate types on
36
+ the page, renders a search result based on the key-value pairs
37
+ found in those DataObjects. If the template file is not
38
+ specified, Google will use the default predefined set of
39
+ templates tailored to popular content.
40
+ </xsd:documentation>
41
+ </xsd:annotation>
42
+ </xsd:attribute>
43
+ </xsd:complexType>
44
+ </xsd:element>
45
+ <xsd:element name="DataObject" minOccurs="0" maxOccurs="unbounded">
46
+ <xsd:complexType>
47
+ <xsd:sequence>
48
+ <xsd:element name="Attribute" minOccurs="0" maxOccurs="unbounded">
49
+ <xsd:annotation>
50
+ <xsd:documentation>
51
+ Either 'value' attribute or text content must be set, but
52
+ not both.
53
+ </xsd:documentation>
54
+ </xsd:annotation>
55
+ <xsd:complexType>
56
+ <xsd:simpleContent>
57
+ <xsd:extension base="xsd:string">
58
+ <xsd:attribute name="name" type="xsd:string" use="required">
59
+ <xsd:annotation>
60
+ <xsd:documentation>
61
+ Name of the attribute.
62
+ </xsd:documentation>
63
+ </xsd:annotation>
64
+ </xsd:attribute>
65
+ <xsd:attribute name="value" type="xsd:string">
66
+ <xsd:annotation>
67
+ <xsd:documentation>
68
+ Value of the attribute.
69
+ </xsd:documentation>
70
+ </xsd:annotation>
71
+ </xsd:attribute>
72
+ </xsd:extension>
73
+ </xsd:simpleContent>
74
+ </xsd:complexType>
75
+ </xsd:element>
76
+ </xsd:sequence>
77
+ <xsd:attribute name="type" type="xsd:string" use="required">
78
+ <xsd:annotation>
79
+ <xsd:documentation>
80
+ Type of the object.
81
+ </xsd:documentation>
82
+ </xsd:annotation>
83
+ </xsd:attribute>
84
+ <xsd:attribute name="id" type="xsd:string">
85
+ <xsd:annotation>
86
+ <xsd:documentation>
87
+ ID of the object.
88
+ </xsd:documentation>
89
+ </xsd:annotation>
90
+ </xsd:attribute>
91
+ </xsd:complexType>
92
+ </xsd:element>
93
+ </xsd:sequence>
94
+ </xsd:complexType>
95
+ </xsd:element>
96
+
97
+ </xsd:schema>
@@ -0,0 +1,643 @@
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="tPlatformList">
54
+ <xsd:annotation>
55
+ <xsd:documentation>
56
+ Space-separated platform names.
57
+
58
+ Platform names:
59
+ web - desktop and laptop browsers.
60
+ mobile - mobile devices such as phones and tablets.
61
+ tv - tv platforms such as GoogleTV.
62
+ </xsd:documentation>
63
+ </xsd:annotation>
64
+ <xsd:restriction base="xsd:string">
65
+ <xsd:pattern value="((web|mobile|tv)( (web|mobile|tv))*)?"/>
66
+ </xsd:restriction>
67
+ </xsd:simpleType>
68
+
69
+ <xsd:element name="video">
70
+ <xsd:complexType>
71
+ <xsd:sequence>
72
+ <xsd:element name="thumbnail_loc" type="xsd:anyURI">
73
+ <xsd:annotation>
74
+ <xsd:documentation>
75
+ A URL pointing to the URL for the video thumbnail image file. We can
76
+ accept most image sizes/types but recommend your thumbnails are at
77
+ least 120x90 pixels in .jpg, .png, or. gif formats.
78
+ </xsd:documentation>
79
+ </xsd:annotation>
80
+ </xsd:element>
81
+
82
+ <xsd:element name="title">
83
+ <xsd:annotation>
84
+ <xsd:documentation>
85
+ The title of the video.
86
+ </xsd:documentation>
87
+ </xsd:annotation>
88
+ <xsd:simpleType>
89
+ <xsd:restriction base="xsd:string">
90
+ <xsd:maxLength value="100"/>
91
+ </xsd:restriction>
92
+ </xsd:simpleType>
93
+ </xsd:element>
94
+
95
+ <xsd:element name="description">
96
+ <xsd:annotation>
97
+ <xsd:documentation>
98
+ The description of the video.
99
+ </xsd:documentation>
100
+ </xsd:annotation>
101
+ <xsd:simpleType>
102
+ <xsd:restriction base="xsd:string">
103
+ <xsd:maxLength value="2048"/>
104
+ </xsd:restriction>
105
+ </xsd:simpleType>
106
+ </xsd:element>
107
+
108
+ <xsd:element name="content_loc" minOccurs="0" type="xsd:anyURI">
109
+ <xsd:annotation>
110
+ <xsd:documentation>
111
+ At least one of &lt;video:player_loc&gt; and
112
+ &lt;video:content_loc&gt; is required.
113
+
114
+ This should be a .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi,
115
+ .ra, .ram, .rm, .flv, or other video file format, and can be omitted
116
+ if &lt;video:player_loc&gt; is specified. However, because Google
117
+ needs to be able to check that the Flash object is actually a player
118
+ for video (as opposed to some other use of Flash, e.g. games and
119
+ animations), it's helpful to provide both.
120
+ </xsd:documentation>
121
+ </xsd:annotation>
122
+ </xsd:element>
123
+
124
+ <xsd:element name="player_loc" minOccurs="0">
125
+ <xsd:annotation>
126
+ <xsd:documentation>
127
+ At least one of &lt;video:player_loc&gt; and
128
+ &lt;video:content_loc&gt; is required.
129
+
130
+ A URL pointing to a Flash player for a specific video. In general,
131
+ this is the information in the src element of an &lt;embed&gt; tag
132
+ and should not be the same as the content of the &lt;loc&gt; tag.
133
+ ​Since each video is uniquely identified by its content URL (the
134
+ location of the actual video file) or, if a content URL is not
135
+ present, a player URL (a URL pointing to a player for the video),
136
+ you must include either the &lt;video:player_loc&gt; or
137
+ &lt;video:content_loc&gt; tags. If these tags are omitted and we
138
+ can't find this information, we'll be unable to index your video.
139
+ </xsd:documentation>
140
+ </xsd:annotation>
141
+ <xsd:complexType>
142
+ <xsd:simpleContent>
143
+ <xsd:extension base="xsd:anyURI">
144
+ <xsd:attribute name="allow_embed" type="tYesNo">
145
+ <xsd:annotation>
146
+ <xsd:documentation>
147
+ Attribute allow_embed specifies whether Google can embed the
148
+ video in search results. Allowed values are "Yes" or "No".
149
+ The default value is "Yes".
150
+ </xsd:documentation>
151
+ </xsd:annotation>
152
+ </xsd:attribute>
153
+ <xsd:attribute name="autoplay" type="xsd:string">
154
+ <xsd:annotation>
155
+ <xsd:documentation>
156
+ User-defined string that Google may append (if appropriate)
157
+ to the flashvars parameter to enable autoplay of the video.
158
+ </xsd:documentation>
159
+ </xsd:annotation>
160
+ </xsd:attribute>
161
+ </xsd:extension>
162
+ </xsd:simpleContent>
163
+ </xsd:complexType>
164
+ </xsd:element>
165
+
166
+ <xsd:element name="duration" minOccurs="0">
167
+ <xsd:annotation>
168
+ <xsd:documentation>
169
+ The duration of the video in seconds.
170
+ </xsd:documentation>
171
+ </xsd:annotation>
172
+ <xsd:simpleType>
173
+ <xsd:restriction base="xsd:nonNegativeInteger">
174
+ <xsd:maxInclusive value="28800"/>
175
+ </xsd:restriction>
176
+ </xsd:simpleType>
177
+ </xsd:element>
178
+
179
+ <xsd:element name="expiration_date" minOccurs="0">
180
+ <xsd:annotation>
181
+ <xsd:documentation>
182
+ The date after which the video will no longer be available, in
183
+ W3C format. Acceptable values are complete date (YYYY-MM-DD) and
184
+ complete date plus hours, minutes and seconds, and timezone
185
+ (YYYY-MM-DDThh:mm:ss+TZD). For example, 2007-07-16T19:20:30+08:00.
186
+ Don't supply this information if your video does not expire.
187
+ </xsd:documentation>
188
+ </xsd:annotation>
189
+ <xsd:simpleType>
190
+ <xsd:union>
191
+ <xsd:simpleType>
192
+ <xsd:restriction base="xsd:date"/>
193
+ </xsd:simpleType>
194
+ <xsd:simpleType>
195
+ <xsd:restriction base="xsd:dateTime"/>
196
+ </xsd:simpleType>
197
+ </xsd:union>
198
+ </xsd:simpleType>
199
+ </xsd:element>
200
+
201
+ <xsd:element name="rating" minOccurs="0">
202
+ <xsd:annotation>
203
+ <xsd:documentation>
204
+ The rating of the video.
205
+ </xsd:documentation>
206
+ </xsd:annotation>
207
+ <xsd:simpleType>
208
+ <xsd:restriction base="xsd:decimal">
209
+ <xsd:minInclusive value="0"/>
210
+ <xsd:maxInclusive value="5"/>
211
+ </xsd:restriction>
212
+ </xsd:simpleType>
213
+ </xsd:element>
214
+
215
+ <xsd:element name="content_segment_loc"
216
+ minOccurs="0"
217
+ maxOccurs="unbounded">
218
+ <xsd:annotation>
219
+ <xsd:documentation>
220
+ Use &lt;video:content_segment_loc&gt; only in conjunction with
221
+ &lt;video:player_loc&gt;.
222
+
223
+ If you publish your video as a series of raw videos (for example, if
224
+ you submit a full movie as a continuous series of shorter clips),
225
+ you can use the &lt;video:content_segment_loc&gt; to supply us with
226
+ a series of URLs, in the order in which they should be concatenated
227
+ to recreate the video in its entirety. Each URL should point to a
228
+ .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm,
229
+ .flv, or other video file format. It should not point to any Flash
230
+ content.
231
+ </xsd:documentation>
232
+ </xsd:annotation>
233
+ <xsd:complexType>
234
+ <xsd:simpleContent>
235
+ <xsd:extension base="xsd:anyURI">
236
+ <xsd:attribute name="duration">
237
+ <xsd:annotation>
238
+ <xsd:documentation>
239
+ The duration of the clip in seconds.
240
+ </xsd:documentation>
241
+ </xsd:annotation>
242
+ <xsd:simpleType>
243
+ <xsd:restriction base="xsd:nonNegativeInteger">
244
+ <xsd:maxInclusive value="28800"/>
245
+ </xsd:restriction>
246
+ </xsd:simpleType>
247
+ </xsd:attribute>
248
+ </xsd:extension>
249
+ </xsd:simpleContent>
250
+ </xsd:complexType>
251
+ </xsd:element>
252
+
253
+ <xsd:element name="view_count"
254
+ minOccurs="0"
255
+ type="xsd:nonNegativeInteger">
256
+ <xsd:annotation>
257
+ <xsd:documentation>
258
+ The number of times the video has been viewed.
259
+ </xsd:documentation>
260
+ </xsd:annotation>
261
+ </xsd:element>
262
+
263
+ <xsd:element name="publication_date" minOccurs="0">
264
+ <xsd:annotation>
265
+ <xsd:documentation>
266
+ The date the video was first published, in W3C format. Acceptable
267
+ values are complete date (YYYY-MM-DD) and complete date plus hours,
268
+ minutes and seconds, and timezone (YYYY-MM-DDThh:mm:ss+TZD).
269
+ For example, 2007-07-16T19:20:30+08:00.
270
+ </xsd:documentation>
271
+ </xsd:annotation>
272
+ <xsd:simpleType>
273
+ <xsd:union>
274
+ <xsd:simpleType>
275
+ <xsd:restriction base="xsd:date"/>
276
+ </xsd:simpleType>
277
+ <xsd:simpleType>
278
+ <xsd:restriction base="xsd:dateTime"/>
279
+ </xsd:simpleType>
280
+ </xsd:union>
281
+ </xsd:simpleType>
282
+ </xsd:element>
283
+
284
+ <xsd:element name="tag" type="xsd:string" minOccurs="0" maxOccurs="32">
285
+ <xsd:annotation>
286
+ <xsd:documentation>
287
+ A tag associated with the video. Tags are generally very short
288
+ descriptions of key concepts associated with a video or piece of
289
+ content. A single video could have several tags, although it might
290
+ belong to only one category. For example, a video about grilling
291
+ food may belong in the Grilling category, but could be tagged
292
+ "steak", "meat", "summer", and "outdoor". Create a new
293
+ &lt;video:tag&gt; element for each tag associated with a video.
294
+ </xsd:documentation>
295
+ </xsd:annotation>
296
+ </xsd:element>
297
+
298
+ <xsd:element name="category" minOccurs="0">
299
+ <xsd:annotation>
300
+ <xsd:documentation>
301
+ The video's category - for example, cooking. In general, categories
302
+ are broad groupings of content by subject. For example, a site about
303
+ cooking could have categories for Broiling, Baking, and Grilling.
304
+ </xsd:documentation>
305
+ </xsd:annotation>
306
+ <xsd:simpleType>
307
+ <xsd:restriction base="xsd:string">
308
+ <xsd:maxLength value="256"/>
309
+ </xsd:restriction>
310
+ </xsd:simpleType>
311
+ </xsd:element>
312
+
313
+ <xsd:element name="family_friendly" minOccurs="0" type="tYesNo">
314
+ <xsd:annotation>
315
+ <xsd:documentation>
316
+ Whether the video is suitable for viewing by children. No if the
317
+ video should be available only to users with SafeSearch turned off.
318
+ </xsd:documentation>
319
+ </xsd:annotation>
320
+ </xsd:element>
321
+
322
+ <xsd:element name="restriction" minOccurs="0">
323
+ <xsd:annotation>
324
+ <xsd:documentation>
325
+ A list of countries where the video may or may not be played.
326
+ If there is no &lt;video:restriction&gt; tag, it is assumed that
327
+ the video can be played in all territories.
328
+ </xsd:documentation>
329
+ </xsd:annotation>
330
+ <xsd:complexType>
331
+ <xsd:simpleContent>
332
+ <xsd:extension base="tCountryList">
333
+ <xsd:attribute name="relationship" use="required">
334
+ <xsd:annotation>
335
+ <xsd:documentation>
336
+ Attribute "relationship" specifies whether the video is
337
+ restricted or permitted for the specified countries.
338
+ </xsd:documentation>
339
+ </xsd:annotation>
340
+ <xsd:simpleType>
341
+ <xsd:restriction base="xsd:string">
342
+ <xsd:enumeration value="allow"/>
343
+ <xsd:enumeration value="deny"/>
344
+ </xsd:restriction>
345
+ </xsd:simpleType>
346
+ </xsd:attribute>
347
+ </xsd:extension>
348
+ </xsd:simpleContent>
349
+ </xsd:complexType>
350
+ </xsd:element>
351
+
352
+ <xsd:element name="gallery_loc" minOccurs="0">
353
+ <xsd:annotation>
354
+ <xsd:documentation>
355
+ A link to the gallery (collection of videos) in which this video
356
+ appears.
357
+ </xsd:documentation>
358
+ </xsd:annotation>
359
+ <xsd:complexType>
360
+ <xsd:simpleContent>
361
+ <xsd:extension base="xsd:anyURI">
362
+ <xsd:attribute name="title" type="xsd:string">
363
+ <xsd:annotation>
364
+ <xsd:documentation>
365
+ The title of the gallery.
366
+ </xsd:documentation>
367
+ </xsd:annotation>
368
+ </xsd:attribute>
369
+ </xsd:extension>
370
+ </xsd:simpleContent>
371
+ </xsd:complexType>
372
+ </xsd:element>
373
+
374
+ <xsd:element name="price" minOccurs="0" maxOccurs="unbounded">
375
+ <xsd:annotation>
376
+ <xsd:documentation>
377
+ The price to download or view the video. More than one
378
+ &lt;video:price&gt; element can be listed (for example, in order to
379
+ specify various currencies). The price value must either be a
380
+ non-negative decimal or be empty. If a price value is specified, the
381
+ currency attribute is required. If no price value is specified, the
382
+ type attribute must be valid and present. The resolution attribute
383
+ is optional.
384
+ </xsd:documentation>
385
+ </xsd:annotation>
386
+ <xsd:complexType>
387
+ <xsd:simpleContent>
388
+ <xsd:extension base="xsd:string">
389
+ <xsd:attribute name="currency">
390
+ <xsd:annotation>
391
+ <xsd:documentation>
392
+ The currency in ISO 4217 format. This attribute is required
393
+ if a value is given for price.
394
+ </xsd:documentation>
395
+ </xsd:annotation>
396
+ <xsd:simpleType>
397
+ <xsd:restriction base="xsd:string">
398
+ <xsd:pattern value="[A-Z]{3}"/>
399
+ </xsd:restriction>
400
+ </xsd:simpleType>
401
+ </xsd:attribute>
402
+ <xsd:attribute name="type">
403
+ <xsd:annotation>
404
+ <xsd:documentation>
405
+ The type (purchase or rent) of price. This value is required
406
+ if there is no value given for price.
407
+ </xsd:documentation>
408
+ </xsd:annotation>
409
+ <xsd:simpleType>
410
+ <xsd:restriction base="xsd:string">
411
+ <xsd:enumeration value="purchase"/>
412
+ <xsd:enumeration value="PURCHASE"/>
413
+ <xsd:enumeration value="rent"/>
414
+ <xsd:enumeration value="RENT"/>
415
+ </xsd:restriction>
416
+ </xsd:simpleType>
417
+ </xsd:attribute>
418
+ <xsd:attribute name="resolution">
419
+ <xsd:annotation>
420
+ <xsd:documentation>
421
+ The resolution of the video at this price (SD or HD).
422
+ </xsd:documentation>
423
+ </xsd:annotation>
424
+ <xsd:simpleType>
425
+ <xsd:restriction base="xsd:string">
426
+ <xsd:enumeration value="sd"/>
427
+ <xsd:enumeration value="SD"/>
428
+ <xsd:enumeration value="hd"/>
429
+ <xsd:enumeration value="HD"/>
430
+ </xsd:restriction>
431
+ </xsd:simpleType>
432
+ </xsd:attribute>
433
+ </xsd:extension>
434
+ </xsd:simpleContent>
435
+ </xsd:complexType>
436
+ </xsd:element>
437
+
438
+ <xsd:element name="requires_subscription" minOccurs="0" type="tYesNo">
439
+ <xsd:annotation>
440
+ <xsd:documentation>
441
+ Indicates whether a subscription (either paid or free) is required
442
+ to view the video.
443
+ </xsd:documentation>
444
+ </xsd:annotation>
445
+ </xsd:element>
446
+
447
+ <xsd:element name="uploader" minOccurs="0">
448
+ <xsd:annotation>
449
+ <xsd:documentation>
450
+ A name or handle of the video’s uploader.
451
+ </xsd:documentation>
452
+ </xsd:annotation>
453
+ <xsd:complexType>
454
+ <xsd:simpleContent>
455
+ <xsd:extension base="xsd:string">
456
+ <xsd:attribute name="info" type="xsd:anyURI">
457
+ <xsd:annotation>
458
+ <xsd:documentation>
459
+ The URL of a webpage with additional information about this
460
+ uploader. This URL must be on the same domain as the
461
+ &lt;loc&gt; tag.
462
+ </xsd:documentation>
463
+ </xsd:annotation>
464
+ </xsd:attribute>
465
+ </xsd:extension>
466
+ </xsd:simpleContent>
467
+ </xsd:complexType>
468
+ </xsd:element>
469
+
470
+ <xsd:element name="tvshow" minOccurs="0">
471
+ <xsd:annotation>
472
+ <xsd:documentation>
473
+ Encloses all information about a single TV video.
474
+ </xsd:documentation>
475
+ </xsd:annotation>
476
+ <xsd:complexType>
477
+ <xsd:sequence>
478
+ <xsd:element name="show_title" type="xsd:string">
479
+ <xsd:annotation>
480
+ <xsd:documentation>
481
+ The title of the TV show. This should be the same for all
482
+ episodes from the same series.
483
+ </xsd:documentation>
484
+ </xsd:annotation>
485
+ </xsd:element>
486
+ <xsd:element name="video_type">
487
+ <xsd:annotation>
488
+ <xsd:documentation>
489
+ Describes the relationship of the video to the specified
490
+ TV show/episode.
491
+ </xsd:documentation>
492
+ </xsd:annotation>
493
+ <xsd:simpleType>
494
+ <xsd:restriction base="xsd:string">
495
+ <!-- Complete episode -->
496
+ <xsd:enumeration value="full"/>
497
+ <!-- Episode promo -->
498
+ <xsd:enumeration value="preview"/>
499
+ <!-- Episode clip -->
500
+ <xsd:enumeration value="clip"/>
501
+ <!-- Interview -->
502
+ <xsd:enumeration value="interview"/>
503
+ <!-- News related to the content -->
504
+ <xsd:enumeration value="news"/>
505
+ <!-- If none of the above options accurately describe
506
+ the relationship -->
507
+ <xsd:enumeration value="other"/>
508
+ </xsd:restriction>
509
+ </xsd:simpleType>
510
+ </xsd:element>
511
+ <xsd:element name="episode_title" type="xsd:string" minOccurs="0">
512
+ <xsd:annotation>
513
+ <xsd:documentation>
514
+ The title of the episode—for example, "Flesh and Bone" is the
515
+ title of the Season 1, Episode 8 episode of Battlestar
516
+ Galactica. This tag is not necessary if the video is not
517
+ related to a specific episode (for example, if it's a trailer
518
+ for an entire series or season).
519
+ </xsd:documentation>
520
+ </xsd:annotation>
521
+ </xsd:element>
522
+ <xsd:element name="season_number" minOccurs="0">
523
+ <xsd:annotation>
524
+ <xsd:documentation>
525
+ Only for shows with a per-season schedule.
526
+ </xsd:documentation>
527
+ </xsd:annotation>
528
+ <xsd:simpleType>
529
+ <xsd:restriction base="xsd:integer">
530
+ <xsd:minInclusive value="1"/>
531
+ </xsd:restriction>
532
+ </xsd:simpleType>
533
+ </xsd:element>
534
+ <xsd:element name="episode_number" minOccurs="0">
535
+ <xsd:annotation>
536
+ <xsd:documentation>
537
+ The episode number in number format. For TV shoes with a
538
+ per-season schedule, the first episode of each series should
539
+ be numbered 1.
540
+ </xsd:documentation>
541
+ </xsd:annotation>
542
+ <xsd:simpleType>
543
+ <xsd:restriction base="xsd:integer">
544
+ <xsd:minInclusive value="1"/>
545
+ </xsd:restriction>
546
+ </xsd:simpleType>
547
+ </xsd:element>
548
+ <xsd:element name="premier_date" minOccurs="0">
549
+ <xsd:annotation>
550
+ <xsd:documentation>
551
+ The date the content of the video was first broadcast, in
552
+ W3C format (for example, 2010-11-05.)
553
+ </xsd:documentation>
554
+ </xsd:annotation>
555
+ <xsd:simpleType>
556
+ <xsd:union>
557
+ <xsd:simpleType>
558
+ <xsd:restriction base="xsd:date"/>
559
+ </xsd:simpleType>
560
+ <xsd:simpleType>
561
+ <xsd:restriction base="xsd:dateTime"/>
562
+ </xsd:simpleType>
563
+ </xsd:union>
564
+ </xsd:simpleType>
565
+ </xsd:element>
566
+ </xsd:sequence>
567
+ </xsd:complexType>
568
+ </xsd:element>
569
+
570
+ <xsd:element name="platform" minOccurs="0">
571
+ <xsd:annotation>
572
+ <xsd:documentation>
573
+ A list of platforms where the video may or may not be played.
574
+ If there is no &lt;video:platform&gt; tag, it is assumed that
575
+ the video can be played on all platforms.
576
+ </xsd:documentation>
577
+ </xsd:annotation>
578
+ <xsd:complexType>
579
+ <xsd:simpleContent>
580
+ <xsd:extension base="tPlatformList">
581
+ <xsd:attribute name="relationship" use="required">
582
+ <xsd:annotation>
583
+ <xsd:documentation>
584
+ Attribute "relationship" specifies whether the video is
585
+ restricted or permitted for the specified platforms.
586
+ </xsd:documentation>
587
+ </xsd:annotation>
588
+ <xsd:simpleType>
589
+ <xsd:restriction base="xsd:string">
590
+ <xsd:enumeration value="allow"/>
591
+ <xsd:enumeration value="deny"/>
592
+ </xsd:restriction>
593
+ </xsd:simpleType>
594
+ </xsd:attribute>
595
+ </xsd:extension>
596
+ </xsd:simpleContent>
597
+ </xsd:complexType>
598
+ </xsd:element>
599
+
600
+ <xsd:element name="live" minOccurs="0" type="tYesNo">
601
+ <xsd:annotation>
602
+ <xsd:documentation>
603
+ Whether the video is a live internet broadcast.
604
+ </xsd:documentation>
605
+ </xsd:annotation>
606
+ </xsd:element>
607
+
608
+ <xsd:element name="id" minOccurs="0" maxOccurs="unbounded">
609
+ <xsd:annotation>
610
+ <xsd:documentation>
611
+ An unambiguous identifier for the video within a given
612
+ identification context.
613
+ </xsd:documentation>
614
+ </xsd:annotation>
615
+ <xsd:complexType>
616
+ <xsd:simpleContent>
617
+ <xsd:extension base="xsd:string">
618
+ <xsd:attribute name="type" use="required">
619
+ <xsd:annotation>
620
+ <xsd:documentation>
621
+ The identification context.
622
+ </xsd:documentation>
623
+ </xsd:annotation>
624
+ <xsd:simpleType>
625
+ <xsd:restriction base="xsd:string">
626
+ <xsd:enumeration value="tms:series"/>
627
+ <xsd:enumeration value="tms:program"/>
628
+ <xsd:enumeration value="rovi:series"/>
629
+ <xsd:enumeration value="rovi:program"/>
630
+ <xsd:enumeration value="freebase"/>
631
+ <xsd:enumeration value="url"/>
632
+ </xsd:restriction>
633
+ </xsd:simpleType>
634
+ </xsd:attribute>
635
+ </xsd:extension>
636
+ </xsd:simpleContent>
637
+ </xsd:complexType>
638
+ </xsd:element>
639
+ </xsd:sequence>
640
+ </xsd:complexType>
641
+ </xsd:element>
642
+
643
+ </xsd:schema>