ruby-vast 1.0.6

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 (42) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +20 -0
  3. data/README.rdoc +55 -0
  4. data/lib/ruby-vast.rb +1 -0
  5. data/lib/vast.rb +33 -0
  6. data/lib/vast/ad.rb +103 -0
  7. data/lib/vast/companion_creative.rb +81 -0
  8. data/lib/vast/creative.rb +62 -0
  9. data/lib/vast/document.rb +71 -0
  10. data/lib/vast/element.rb +9 -0
  11. data/lib/vast/extension.rb +18 -0
  12. data/lib/vast/icon.rb +87 -0
  13. data/lib/vast/inline_ad.rb +22 -0
  14. data/lib/vast/linear_creative.rb +57 -0
  15. data/lib/vast/mediafile.rb +56 -0
  16. data/lib/vast/non_linear_creative.rb +97 -0
  17. data/lib/vast/version.rb +3 -0
  18. data/lib/vast/wrapper_ad.rb +19 -0
  19. data/lib/vast3_draft.xsd +1036 -0
  20. data/lib/vast_2.0.1.xsd +643 -0
  21. data/test/ad_test.rb +122 -0
  22. data/test/companion_creative_test.rb +38 -0
  23. data/test/creative_test.rb +35 -0
  24. data/test/document_test.rb +72 -0
  25. data/test/examples/document_with_no_ads.xml +3 -0
  26. data/test/examples/document_with_one_inline_ad.xml +121 -0
  27. data/test/examples/document_with_one_inline_and_one_wrapper_ad.xml +105 -0
  28. data/test/examples/document_with_one_wrapper_ad.xml +40 -0
  29. data/test/examples/document_with_two_inline_ads.xml +120 -0
  30. data/test/examples/invalid_document.xml +3 -0
  31. data/test/examples/invalid_document_with_missing_ad_type.xml +58 -0
  32. data/test/examples/invalid_document_with_missing_creative_type.xml +39 -0
  33. data/test/examples/vast3_inline.xml +86 -0
  34. data/test/extension_test.rb +20 -0
  35. data/test/inline_ad_test.rb +14 -0
  36. data/test/linear_creative_test.rb +26 -0
  37. data/test/mediafile_test.rb +20 -0
  38. data/test/non_linear_creative_test.rb +39 -0
  39. data/test/test_helper.rb +13 -0
  40. data/test/vast3_inline_ad_test.rb +23 -0
  41. data/test/wrapper_ad_test.rb +16 -0
  42. metadata +99 -0
@@ -0,0 +1,643 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
3
+ attributeFormDefault="unqualified">
4
+ <xs:element name="VAST">
5
+ <xs:annotation>
6
+ <xs:documentation>IAB VAST, Video Ad Serving Template, video xml ad response, Version 2.0.1, xml schema prepared by Tremor Media</xs:documentation>
7
+ </xs:annotation>
8
+ <xs:complexType>
9
+ <xs:sequence>
10
+ <xs:element name="Ad" maxOccurs="unbounded" minOccurs="0">
11
+ <xs:annotation>
12
+ <xs:documentation>Top-level element, wraps each ad in the response</xs:documentation>
13
+ </xs:annotation>
14
+ <xs:complexType>
15
+ <xs:choice maxOccurs="1" minOccurs="1">
16
+ <xs:element name="InLine" maxOccurs="1" minOccurs="0">
17
+ <xs:annotation>
18
+ <xs:documentation>Second-level element surrounding complete ad data for a single ad</xs:documentation>
19
+ </xs:annotation>
20
+ <xs:complexType>
21
+ <xs:sequence>
22
+ <xs:element name="AdSystem" maxOccurs="1" minOccurs="1"
23
+ type="AdSystem_type">
24
+ <xs:annotation>
25
+ <xs:documentation>Indicates source ad server</xs:documentation>
26
+ </xs:annotation>
27
+ </xs:element>
28
+ <xs:element name="AdTitle" type="xs:string" maxOccurs="1"
29
+ minOccurs="1">
30
+ <xs:annotation>
31
+ <xs:documentation>Common name of ad</xs:documentation>
32
+ </xs:annotation>
33
+ </xs:element>
34
+ <xs:element name="Description" type="xs:string"
35
+ minOccurs="0" maxOccurs="1">
36
+ <xs:annotation>
37
+ <xs:documentation>Longer description of ad</xs:documentation>
38
+ </xs:annotation>
39
+ </xs:element>
40
+ <xs:element name="Survey" type="xs:anyURI" minOccurs="0"
41
+ maxOccurs="1">
42
+ <xs:annotation>
43
+ <xs:documentation>URL of request to survey vendor</xs:documentation>
44
+ </xs:annotation>
45
+ </xs:element>
46
+ <xs:element name="Error" type="xs:anyURI" minOccurs="0"
47
+ maxOccurs="1">
48
+ <xs:annotation>
49
+ <xs:documentation>URL to request if ad does not play due to error</xs:documentation>
50
+ </xs:annotation>
51
+ </xs:element>
52
+ <xs:element name="Impression" type="Impression_type"
53
+ maxOccurs="unbounded" minOccurs="1">
54
+ <xs:annotation>
55
+ <xs:documentation>URL to track impression</xs:documentation>
56
+ </xs:annotation>
57
+ </xs:element>
58
+ <xs:element maxOccurs="1" minOccurs="1" name="Creatives">
59
+ <xs:annotation>
60
+ <xs:documentation>Any number of companions in any desired pixel dimensions.</xs:documentation>
61
+ </xs:annotation>
62
+ <xs:complexType>
63
+ <xs:sequence>
64
+ <xs:element name="Creative" maxOccurs="unbounded">
65
+ <xs:annotation>
66
+ <xs:documentation>Wraps each creative element within an InLine or Wrapper Ad</xs:documentation>
67
+ </xs:annotation>
68
+ <xs:complexType>
69
+ <xs:choice>
70
+ <xs:element name="Linear" minOccurs="0"
71
+ maxOccurs="1">
72
+ <xs:complexType>
73
+ <xs:sequence>
74
+ <xs:element name="Duration" type="xs:time"
75
+ maxOccurs="1" minOccurs="1">
76
+ <xs:annotation>
77
+ <xs:documentation>Duration in standard time format, hh:mm:ss</xs:documentation>
78
+ </xs:annotation>
79
+ </xs:element>
80
+ <xs:element name="TrackingEvents" minOccurs="0"
81
+ type="TrackingEvents_type" maxOccurs="1"> </xs:element>
82
+ <xs:element name="AdParameters" type="xs:string"
83
+ minOccurs="0" maxOccurs="1">
84
+ <xs:annotation>
85
+ <xs:documentation>Data to be passed into the video ad</xs:documentation>
86
+ </xs:annotation>
87
+ </xs:element>
88
+ <xs:element name="VideoClicks" minOccurs="0"
89
+ type="VideoClicks_type" maxOccurs="1"> </xs:element>
90
+ <xs:element name="MediaFiles" minOccurs="0"
91
+ maxOccurs="1">
92
+ <xs:complexType>
93
+ <xs:sequence>
94
+ <xs:element name="MediaFile" minOccurs="1"
95
+ maxOccurs="unbounded">
96
+ <xs:annotation>
97
+ <xs:documentation>Location of linear file</xs:documentation>
98
+ </xs:annotation>
99
+ <xs:complexType>
100
+ <xs:simpleContent>
101
+ <xs:extension base="xs:anyURI">
102
+ <xs:attribute name="id" type="xs:string"
103
+ use="optional">
104
+ <xs:annotation>
105
+ <xs:documentation>Optional identifier</xs:documentation>
106
+ </xs:annotation>
107
+ </xs:attribute>
108
+ <xs:attribute name="delivery" use="required">
109
+ <xs:annotation>
110
+ <xs:documentation>Method of delivery of ad</xs:documentation>
111
+ </xs:annotation>
112
+ <xs:simpleType>
113
+ <xs:restriction base="xs:NMTOKEN">
114
+ <xs:enumeration value="streaming"/>
115
+ <xs:enumeration value="progressive"/>
116
+ </xs:restriction>
117
+ </xs:simpleType>
118
+ </xs:attribute>
119
+ <xs:attribute name="type" use="required"
120
+ type="xs:string">
121
+ <xs:annotation>
122
+ <xs:documentation>MIME type. Popular MIME types include, but are not limited to “video/x-ms-wmv” for Windows Media, and “video/x-flv” for Flash Video. Image ads or interactive ads can be included in the MediaFiles section with appropriate Mime types</xs:documentation>
123
+ </xs:annotation>
124
+ </xs:attribute>
125
+ <xs:attribute name="bitrate" type="xs:integer"
126
+ use="optional">
127
+ <xs:annotation>
128
+ <xs:documentation>Bitrate of encoded video in Kbps</xs:documentation>
129
+ </xs:annotation>
130
+ </xs:attribute>
131
+ <xs:attribute name="width" type="xs:integer"
132
+ use="required">
133
+ <xs:annotation>
134
+ <xs:documentation>Pixel dimensions of video</xs:documentation>
135
+ </xs:annotation>
136
+ </xs:attribute>
137
+ <xs:attribute name="height" type="xs:integer"
138
+ use="required">
139
+ <xs:annotation>
140
+ <xs:documentation>Pixel dimensions of video</xs:documentation>
141
+ </xs:annotation>
142
+ </xs:attribute>
143
+ <xs:attribute name="scalable" type="xs:boolean"
144
+ use="optional">
145
+ <xs:annotation>
146
+ <xs:documentation>Whether it is acceptable to scale the image.</xs:documentation>
147
+ </xs:annotation>
148
+ </xs:attribute>
149
+ <xs:attribute name="maintainAspectRatio"
150
+ type="xs:boolean" use="optional">
151
+ <xs:annotation>
152
+ <xs:documentation>Whether the ad must have its aspect ratio maintained when scales</xs:documentation>
153
+ </xs:annotation>
154
+ </xs:attribute>
155
+ <xs:attribute name="apiFramework" type="xs:string"
156
+ use="optional">
157
+ <xs:annotation>
158
+ <xs:documentation>The apiFramework defines the method to use for communication if the MediaFile is interactive. Suggested values for this element are “VPAID”, “FlashVars” (for Flash/Flex), “initParams” (for Silverlight) and “GetVariables” (variables placed in key/value pairs on the asset request).</xs:documentation>
159
+ </xs:annotation>
160
+ </xs:attribute>
161
+ </xs:extension>
162
+ </xs:simpleContent>
163
+ </xs:complexType>
164
+ </xs:element>
165
+ </xs:sequence>
166
+ </xs:complexType>
167
+ </xs:element>
168
+ </xs:sequence>
169
+ </xs:complexType>
170
+ </xs:element>
171
+ <xs:element name="CompanionAds" minOccurs="0"
172
+ maxOccurs="1">
173
+ <xs:complexType>
174
+ <xs:sequence>
175
+ <xs:element name="Companion" minOccurs="0"
176
+ maxOccurs="unbounded" type="Companion_type">
177
+ <xs:annotation>
178
+ <xs:documentation>Any number of companions in any desired pixel dimensions.</xs:documentation>
179
+ </xs:annotation>
180
+ </xs:element>
181
+ </xs:sequence>
182
+ </xs:complexType>
183
+ </xs:element>
184
+ <xs:element name="NonLinearAds" minOccurs="0"
185
+ maxOccurs="1">
186
+ <xs:complexType>
187
+ <xs:sequence>
188
+ <xs:element name="TrackingEvents" minOccurs="0"
189
+ type="TrackingEvents_type" maxOccurs="1"> </xs:element>
190
+ <xs:element name="NonLinear" minOccurs="1"
191
+ maxOccurs="unbounded" type="NonLinear_type">
192
+ <xs:annotation>
193
+ <xs:documentation>Any number of companions in any desired pixel dimensions.</xs:documentation>
194
+ </xs:annotation>
195
+ </xs:element>
196
+ </xs:sequence>
197
+ </xs:complexType>
198
+ </xs:element>
199
+ </xs:choice>
200
+ <xs:attribute name="id" type="xs:string"
201
+ use="optional"/>
202
+ <xs:attribute name="sequence" type="xs:integer"
203
+ use="optional">
204
+ <xs:annotation>
205
+ <xs:documentation>The preferred order in which multiple Creatives should be displayed</xs:documentation>
206
+ </xs:annotation>
207
+ </xs:attribute>
208
+ <xs:attribute name="AdID" type="xs:string"
209
+ use="optional">
210
+ <xs:annotation>
211
+ <xs:documentation>Ad-ID for the creative (formerly ISCI)</xs:documentation>
212
+ </xs:annotation>
213
+ </xs:attribute>
214
+ </xs:complexType>
215
+ </xs:element>
216
+ </xs:sequence>
217
+ </xs:complexType>
218
+ </xs:element>
219
+ <xs:element name="Extensions" minOccurs="0" maxOccurs="1">
220
+ <xs:complexType>
221
+ <xs:sequence>
222
+ <xs:element name="Extension" type="xs:anyType"
223
+ minOccurs="0" maxOccurs="unbounded">
224
+ <xs:annotation>
225
+ <xs:documentation>Any valid XML may be included in the Extensions node</xs:documentation>
226
+ </xs:annotation>
227
+ </xs:element>
228
+ </xs:sequence>
229
+ </xs:complexType>
230
+ </xs:element>
231
+ </xs:sequence>
232
+ </xs:complexType>
233
+ </xs:element>
234
+ <xs:element name="Wrapper" maxOccurs="1" minOccurs="0">
235
+ <xs:annotation>
236
+ <xs:documentation>Second-level element surrounding wrapper ad pointing to Secondary ad server.</xs:documentation>
237
+ </xs:annotation>
238
+ <xs:complexType>
239
+ <xs:sequence>
240
+ <xs:element name="AdSystem" type="AdSystem_type"
241
+ maxOccurs="1" minOccurs="1">
242
+ <xs:annotation>
243
+ <xs:documentation>Indicates source ad server</xs:documentation>
244
+ </xs:annotation>
245
+ </xs:element>
246
+ <xs:element name="VASTAdTagURI" type="xs:anyURI"
247
+ maxOccurs="1" minOccurs="1">
248
+ <xs:annotation>
249
+ <xs:documentation>URL of ad tag of downstream Secondary Ad Server</xs:documentation>
250
+ </xs:annotation>
251
+ </xs:element>
252
+ <xs:element name="Error" type="xs:anyURI" minOccurs="0"
253
+ maxOccurs="1">
254
+ <xs:annotation>
255
+ <xs:documentation>URL to request if ad does not play due to error</xs:documentation>
256
+ </xs:annotation>
257
+ </xs:element>
258
+ <xs:element name="Impression" type="xs:anyURI"
259
+ maxOccurs="unbounded" minOccurs="1">
260
+ <xs:annotation>
261
+ <xs:documentation>URL to request to track an impression</xs:documentation>
262
+ </xs:annotation>
263
+ </xs:element>
264
+ <xs:element name="Creatives">
265
+ <xs:complexType>
266
+ <xs:sequence>
267
+ <xs:element name="Creative" maxOccurs="unbounded"
268
+ minOccurs="0">
269
+ <xs:complexType>
270
+ <xs:choice>
271
+ <xs:element name="Linear" minOccurs="0"
272
+ maxOccurs="1">
273
+ <xs:complexType>
274
+ <xs:sequence>
275
+ <xs:element name="TrackingEvents" minOccurs="0"
276
+ type="TrackingEvents_type" maxOccurs="1"> </xs:element>
277
+ <xs:element name="VideoClicks" minOccurs="0"
278
+ maxOccurs="1">
279
+ <xs:complexType>
280
+ <xs:sequence>
281
+ <xs:element name="ClickTracking" minOccurs="0"
282
+ maxOccurs="unbounded">
283
+ <xs:annotation>
284
+ <xs:documentation>URL to request for tracking purposes when user clicks on the video</xs:documentation>
285
+ </xs:annotation>
286
+ <xs:complexType>
287
+ <xs:simpleContent>
288
+ <xs:extension base="xs:anyURI">
289
+ <xs:attribute name="id" type="xs:string"
290
+ use="optional"/>
291
+ </xs:extension>
292
+ </xs:simpleContent>
293
+ </xs:complexType>
294
+ </xs:element>
295
+ </xs:sequence>
296
+ </xs:complexType>
297
+ </xs:element>
298
+ </xs:sequence>
299
+ </xs:complexType>
300
+ </xs:element>
301
+ <xs:element name="CompanionAds" minOccurs="0"
302
+ maxOccurs="1">
303
+ <xs:complexType>
304
+ <xs:sequence>
305
+ <xs:element name="Companion" minOccurs="0"
306
+ maxOccurs="unbounded" type="Companion_type">
307
+ <xs:annotation>
308
+ <xs:documentation>Definition of Companion ad, if served separately</xs:documentation>
309
+ </xs:annotation>
310
+ </xs:element>
311
+ </xs:sequence>
312
+ </xs:complexType>
313
+ </xs:element>
314
+ <xs:element name="NonLinearAds" minOccurs="0"
315
+ maxOccurs="1">
316
+ <xs:complexType>
317
+ <xs:sequence>
318
+ <xs:element name="TrackingEvents" minOccurs="0"
319
+ type="TrackingEvents_type" maxOccurs="1"> </xs:element>
320
+ <xs:element name="NonLinear" minOccurs="0"
321
+ maxOccurs="unbounded" type="NonLinear_type">
322
+ <xs:annotation>
323
+ <xs:documentation>Any number of companions in any desired pixel dimensions.</xs:documentation>
324
+ </xs:annotation>
325
+ </xs:element>
326
+ </xs:sequence>
327
+ </xs:complexType>
328
+ </xs:element>
329
+ </xs:choice>
330
+ <xs:attribute name="id" type="xs:string"
331
+ use="optional"/>
332
+ <xs:attribute name="sequence" type="xs:integer"
333
+ use="optional">
334
+ <xs:annotation>
335
+ <xs:documentation>The preferred order in which multiple Creatives should be displayed</xs:documentation>
336
+ </xs:annotation>
337
+ </xs:attribute>
338
+ <xs:attribute name="AdID" type="xs:string"
339
+ use="optional">
340
+ <xs:annotation>
341
+ <xs:documentation>Ad-ID for the creative (formerly ISCI)</xs:documentation>
342
+ </xs:annotation>
343
+ </xs:attribute>
344
+ </xs:complexType>
345
+ </xs:element>
346
+ </xs:sequence>
347
+ </xs:complexType>
348
+ </xs:element>
349
+ <xs:element name="Extensions" minOccurs="0" maxOccurs="1">
350
+ <xs:complexType>
351
+ <xs:sequence>
352
+ <xs:element name="Extension" type="xs:anyType"
353
+ minOccurs="0" maxOccurs="unbounded">
354
+ <xs:annotation>
355
+ <xs:documentation>Any valid XML may be included in the Extensions node</xs:documentation>
356
+ </xs:annotation>
357
+ </xs:element>
358
+ </xs:sequence>
359
+ </xs:complexType>
360
+ </xs:element>
361
+ </xs:sequence>
362
+ </xs:complexType>
363
+ </xs:element>
364
+ </xs:choice>
365
+ <xs:attribute name="id" type="xs:string" use="required"/>
366
+ </xs:complexType>
367
+ </xs:element>
368
+ </xs:sequence>
369
+ <xs:attribute name="version" type="xs:string" use="required">
370
+ <xs:annotation>
371
+ <xs:documentation>Current version is 2.0. The 2.0.1 version corrects an error in the Wrapper section related the Linear node's TrackingEvents and VideoCLicks elements.</xs:documentation>
372
+ </xs:annotation>
373
+ </xs:attribute>
374
+ </xs:complexType>
375
+ </xs:element>
376
+ <xs:complexType name="TrackingEvents_type">
377
+ <xs:sequence>
378
+ <xs:element name="Tracking" minOccurs="0" maxOccurs="unbounded">
379
+ <xs:annotation>
380
+ <xs:documentation>The name of the event to track for the Linear element. The creativeView should always be requested when present.</xs:documentation>
381
+ </xs:annotation>
382
+ <xs:complexType>
383
+ <xs:simpleContent>
384
+ <xs:extension base="xs:anyURI">
385
+ <xs:attribute name="event" use="required">
386
+ <xs:annotation>
387
+ <xs:documentation>The name of the event to track. For nonlinear ads these events should be recorded on the video within the ad.</xs:documentation>
388
+ </xs:annotation>
389
+ <xs:simpleType>
390
+ <xs:restriction base="xs:NMTOKEN">
391
+ <xs:enumeration value="creativeView"/>
392
+ <xs:enumeration value="start"/>
393
+ <xs:enumeration value="midpoint"/>
394
+ <xs:enumeration value="firstQuartile"/>
395
+ <xs:enumeration value="thirdQuartile"/>
396
+ <xs:enumeration value="complete"/>
397
+ <xs:enumeration value="mute"/>
398
+ <xs:enumeration value="unmute"/>
399
+ <xs:enumeration value="pause"/>
400
+ <xs:enumeration value="rewind"/>
401
+ <xs:enumeration value="resume"/>
402
+ <xs:enumeration value="fullscreen"/>
403
+ <xs:enumeration value="expand"/>
404
+ <xs:enumeration value="collapse"/>
405
+ <xs:enumeration value="acceptInvitation"/>
406
+ <xs:enumeration value="close"/>
407
+ </xs:restriction>
408
+ </xs:simpleType>
409
+ </xs:attribute>
410
+ </xs:extension>
411
+ </xs:simpleContent>
412
+ </xs:complexType>
413
+ </xs:element>
414
+ </xs:sequence>
415
+ </xs:complexType>
416
+ <xs:complexType name="VideoClicks_type">
417
+ <xs:sequence>
418
+ <xs:element name="ClickThrough" minOccurs="0" maxOccurs="1">
419
+ <xs:annotation>
420
+ <xs:documentation>URL to open as destination page when user clicks on the video</xs:documentation>
421
+ </xs:annotation>
422
+ <xs:complexType>
423
+ <xs:simpleContent>
424
+ <xs:extension base="xs:anyURI">
425
+ <xs:attribute name="id" type="xs:string" use="optional"/>
426
+ </xs:extension>
427
+ </xs:simpleContent>
428
+ </xs:complexType>
429
+ </xs:element>
430
+ <xs:element name="ClickTracking" minOccurs="0" maxOccurs="unbounded">
431
+ <xs:annotation>
432
+ <xs:documentation>URL to request for tracking purposes when user clicks on the video</xs:documentation>
433
+ </xs:annotation>
434
+ <xs:complexType>
435
+ <xs:simpleContent>
436
+ <xs:extension base="xs:anyURI">
437
+ <xs:attribute name="id" type="xs:string" use="optional"/>
438
+ </xs:extension>
439
+ </xs:simpleContent>
440
+ </xs:complexType>
441
+ </xs:element>
442
+ <xs:element name="CustomClick" minOccurs="0" maxOccurs="unbounded">
443
+ <xs:annotation>
444
+ <xs:documentation>URLs to request on custom events such as hotspotted video</xs:documentation>
445
+ </xs:annotation>
446
+ <xs:complexType>
447
+ <xs:simpleContent>
448
+ <xs:extension base="xs:anyURI">
449
+ <xs:attribute name="id" type="xs:string" use="optional"/>
450
+ </xs:extension>
451
+ </xs:simpleContent>
452
+ </xs:complexType>
453
+ </xs:element>
454
+ </xs:sequence>
455
+ </xs:complexType>
456
+ <xs:complexType name="Companion_type">
457
+ <xs:sequence>
458
+ <xs:choice>
459
+ <xs:element name="StaticResource" minOccurs="0" maxOccurs="1">
460
+ <xs:annotation>
461
+ <xs:documentation>URL to a static file, such as an image or SWF file</xs:documentation>
462
+ </xs:annotation>
463
+ <xs:complexType>
464
+ <xs:simpleContent>
465
+ <xs:extension base="xs:anyURI">
466
+ <xs:attribute name="creativeType" type="xs:string" use="required">
467
+ <xs:annotation>
468
+ <xs:documentation>Mime type of static resource</xs:documentation>
469
+ </xs:annotation>
470
+ </xs:attribute>
471
+ </xs:extension>
472
+ </xs:simpleContent>
473
+ </xs:complexType>
474
+ </xs:element>
475
+ <xs:element name="IFrameResource" type="xs:anyURI" minOccurs="0" maxOccurs="1">
476
+ <xs:annotation>
477
+ <xs:documentation>URL source for an IFrame to display the companion element</xs:documentation>
478
+ </xs:annotation>
479
+ </xs:element>
480
+ <xs:element name="HTMLResource" type="xs:string" minOccurs="0" maxOccurs="1">
481
+ <xs:annotation>
482
+ <xs:documentation>HTML to display the companion element</xs:documentation>
483
+ </xs:annotation>
484
+ </xs:element>
485
+ </xs:choice>
486
+ <xs:element maxOccurs="1" minOccurs="0" name="TrackingEvents" type="TrackingEvents_type">
487
+ <xs:annotation>
488
+ <xs:documentation>The creativeView should always be requested when present. For Companions creativeView is the only supported event.</xs:documentation>
489
+ </xs:annotation>
490
+ </xs:element>
491
+ <xs:element name="CompanionClickThrough" type="xs:anyURI" minOccurs="0" maxOccurs="1">
492
+ <xs:annotation>
493
+ <xs:documentation>URL to open as destination page when user clicks on the the companion banner ad.</xs:documentation>
494
+ </xs:annotation>
495
+ </xs:element>
496
+ <xs:element name="AltText" type="xs:string" minOccurs="0" maxOccurs="1">
497
+ <xs:annotation>
498
+ <xs:documentation>Alt text to be displayed when companion is rendered in HTML environment.</xs:documentation>
499
+ </xs:annotation>
500
+ </xs:element>
501
+ <xs:element name="AdParameters" type="xs:string" minOccurs="0" maxOccurs="1">
502
+ <xs:annotation>
503
+ <xs:documentation>Data to be passed into the companion ads. The apiFramework defines the method to use for communication (e.g. “FlashVar”)</xs:documentation>
504
+ </xs:annotation>
505
+ </xs:element>
506
+ </xs:sequence>
507
+ <xs:attribute name="id" type="xs:string" use="optional">
508
+ <xs:annotation>
509
+ <xs:documentation>Optional identifier</xs:documentation>
510
+ </xs:annotation>
511
+ </xs:attribute>
512
+ <xs:attribute name="width" type="xs:integer" use="required">
513
+ <xs:annotation>
514
+ <xs:documentation>Pixel dimensions of companion</xs:documentation>
515
+ </xs:annotation>
516
+ </xs:attribute>
517
+ <xs:attribute name="height" type="xs:integer" use="required">
518
+ <xs:annotation>
519
+ <xs:documentation>Pixel dimensions of companion</xs:documentation>
520
+ </xs:annotation>
521
+ </xs:attribute>
522
+ <xs:attribute name="expandedWidth" type="xs:integer" use="optional">
523
+ <xs:annotation>
524
+ <xs:documentation>Pixel dimensions of expanding companion ad when in expanded state</xs:documentation>
525
+ </xs:annotation>
526
+ </xs:attribute>
527
+ <xs:attribute name="expandedHeight" type="xs:integer" use="optional">
528
+ <xs:annotation>
529
+ <xs:documentation>Pixel dimensions of expanding companion ad when in expanded state</xs:documentation>
530
+ </xs:annotation>
531
+ </xs:attribute>
532
+ <xs:attribute name="apiFramework" type="xs:string" use="optional">
533
+ <xs:annotation>
534
+ <xs:documentation>The apiFramework defines the method to use for communication with the companion</xs:documentation>
535
+ </xs:annotation>
536
+ </xs:attribute>
537
+ </xs:complexType>
538
+ <xs:complexType name="NonLinear_type">
539
+ <xs:sequence>
540
+ <xs:choice>
541
+ <xs:element name="StaticResource" minOccurs="0" maxOccurs="1">
542
+ <xs:annotation>
543
+ <xs:documentation>URL to a static file, such as an image or SWF file</xs:documentation>
544
+ </xs:annotation>
545
+ <xs:complexType>
546
+ <xs:simpleContent>
547
+ <xs:extension base="xs:anyURI">
548
+ <xs:attribute name="creativeType" type="xs:string" use="required">
549
+ <xs:annotation>
550
+ <xs:documentation>Mime type of static resource</xs:documentation>
551
+ </xs:annotation>
552
+ </xs:attribute>
553
+ </xs:extension>
554
+ </xs:simpleContent>
555
+ </xs:complexType>
556
+ </xs:element>
557
+ <xs:element name="IFrameResource" type="xs:anyURI" minOccurs="0" maxOccurs="1">
558
+ <xs:annotation>
559
+ <xs:documentation>URL source for an IFrame to display the companion element</xs:documentation>
560
+ </xs:annotation>
561
+ </xs:element>
562
+ <xs:element name="HTMLResource" type="xs:string" minOccurs="0" maxOccurs="1">
563
+ <xs:annotation>
564
+ <xs:documentation>HTML to display the companion element</xs:documentation>
565
+ </xs:annotation>
566
+ </xs:element>
567
+ </xs:choice>
568
+ <xs:element name="NonLinearClickThrough" type="xs:anyURI" minOccurs="0" maxOccurs="1">
569
+ <xs:annotation>
570
+ <xs:documentation>URL to open as destination page when user clicks on the the non-linear ad unit.</xs:documentation>
571
+ </xs:annotation>
572
+ </xs:element>
573
+ <xs:element name="AdParameters" type="xs:string" minOccurs="0" maxOccurs="1">
574
+ <xs:annotation>
575
+ <xs:documentation>Data to be passed into the video ad. </xs:documentation>
576
+ </xs:annotation>
577
+ </xs:element>
578
+ </xs:sequence>
579
+ <xs:attribute name="id" type="xs:string" use="optional">
580
+ <xs:annotation>
581
+ <xs:documentation>Optional identifier</xs:documentation>
582
+ </xs:annotation>
583
+ </xs:attribute>
584
+ <xs:attribute name="width" type="xs:integer" use="required">
585
+ <xs:annotation>
586
+ <xs:documentation>Pixel dimensions of companion</xs:documentation>
587
+ </xs:annotation>
588
+ </xs:attribute>
589
+ <xs:attribute name="height" type="xs:integer" use="required">
590
+ <xs:annotation>
591
+ <xs:documentation>Pixel dimensions of companion</xs:documentation>
592
+ </xs:annotation>
593
+ </xs:attribute>
594
+ <xs:attribute name="expandedWidth" type="xs:integer" use="optional">
595
+ <xs:annotation>
596
+ <xs:documentation>Pixel dimensions of expanding nonlinear ad when in expanded state</xs:documentation>
597
+ </xs:annotation>
598
+ </xs:attribute>
599
+ <xs:attribute name="expandedHeight" type="xs:integer" use="optional">
600
+ <xs:annotation>
601
+ <xs:documentation>Pixel dimensions of expanding nonlinear ad when in expanded state</xs:documentation>
602
+ </xs:annotation>
603
+ </xs:attribute>
604
+ <xs:attribute name="scalable" type="xs:boolean" use="optional">
605
+ <xs:annotation>
606
+ <xs:documentation>Whether it is acceptable to scale the image.</xs:documentation>
607
+ </xs:annotation>
608
+ </xs:attribute>
609
+ <xs:attribute name="maintainAspectRatio" type="xs:boolean" use="optional">
610
+ <xs:annotation>
611
+ <xs:documentation>Whether the ad must have its aspect ratio maintained when scales</xs:documentation>
612
+ </xs:annotation>
613
+ </xs:attribute>
614
+ <xs:attribute name="minSuggestedDuration" type="xs:time" use="optional">
615
+ <xs:annotation>
616
+ <xs:documentation>Suggested duration to display non-linear ad, typically for animation to complete. Expressed in standard time format hh:mm:ss</xs:documentation>
617
+ </xs:annotation>
618
+ </xs:attribute>
619
+ <xs:attribute name="apiFramework" type="xs:string" use="optional">
620
+ <xs:annotation>
621
+ <xs:documentation>The apiFramework defines the method to use for communication with the nonlinear element</xs:documentation>
622
+ </xs:annotation>
623
+ </xs:attribute>
624
+ </xs:complexType>
625
+ <xs:complexType name="AdSystem_type">
626
+ <xs:simpleContent>
627
+ <xs:extension base="xs:string">
628
+ <xs:attribute name="version" type="xs:string" use="optional">
629
+ <xs:annotation>
630
+ <xs:documentation>Internal version used by ad system</xs:documentation>
631
+ </xs:annotation>
632
+ </xs:attribute>
633
+ </xs:extension>
634
+ </xs:simpleContent>
635
+ </xs:complexType>
636
+ <xs:complexType name="Impression_type">
637
+ <xs:simpleContent>
638
+ <xs:extension base="xs:anyURI">
639
+ <xs:attribute name="id" type="xs:string" use="optional"/>
640
+ </xs:extension>
641
+ </xs:simpleContent>
642
+ </xs:complexType>
643
+ </xs:schema>