-
Notifications
You must be signed in to change notification settings - Fork 2
/
material.xsd
executable file
·613 lines (613 loc) · 21.6 KB
/
material.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
<?xml version="1.0" encoding="UTF-8"?>
<!-- Version 4.2.0, July 2016. Find the latest release on https://github.com/june-ab/public-schedule4 -->
<!-- Public Schedule is an open standard for interchanging TV metadata, broadcasts and rights. -->
<!-- Public Schedule is free to use for all. Originally developed by SVT, TV4 and TeliaSonera. -->
<!-- Now in development by broadcasters and distributors who are members of the Public Schedule group. -->
<!-- Want to participate? Contact [email protected] -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://common.tv.se/material/v4_2_0" targetNamespace="http://common.tv.se/material/v4_2_0"
elementFormDefault="qualified" attributeFormDefault="unqualified"
version="1.0">
<xs:element name="material" type="materialType">
<xs:annotation>
<xs:documentation>Root element for material object</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="materialType">
<xs:sequence>
<xs:element name="materialId" type="xs:string">
<xs:annotation>
<xs:documentation>unique id for content, should include provider
name
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="contentIdRef" type="xs:string">
<xs:annotation>
<xs:documentation>reference to content</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="materialType" type="materialTypeType"
minOccurs="0">
<xs:annotation>
<xs:documentation>type of material
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="videoFormat" type="videoFormatType"
minOccurs="0">
<xs:annotation>
<xs:documentation>format for video, for example HD
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="audioList" type="audioListType"
minOccurs="0">
<xs:annotation>
<xs:documentation>list of available audio for this material
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="aspectRatio" type="aspectRatioType"
minOccurs="0">
<xs:annotation>
<xs:documentation>aspect ratio for the material</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="subtitleList" type="subtitleListType"
minOccurs="0">
<xs:annotation>
<xs:documentation>list of available subtitles</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="accessibilityList" type="accessibilityListType"
minOccurs="0">
<xs:annotation>
<xs:documentation>list of available accessibility types
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="materialReferenceList" type="materialReferenceListType"
minOccurs="0">
<xs:annotation>
<xs:documentation>list of reference to physical material, could be
filenames or an url
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="rightsList" type="rightsListType"
minOccurs="0">
<xs:annotation>
<xs:documentation>list of rights for this material, each right is
for a rights period
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="customPropertyList" type="customPropertyListType" minOccurs="0">
<xs:annotation>
<xs:documentation>List of custom properties
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="timestamp" type="xs:dateTime" use="required">
<xs:annotation>
<xs:documentation>Timestamp when document is created
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="videoFormatType">
<xs:simpleContent>
<xs:extension base="videoFormatTypeType">
<xs:attribute name="threeD" type="xs:boolean">
<xs:annotation>
<xs:documentation>Sets to true if video is in 3D or not. </xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="videoFormatTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="576i" />
<xs:enumeration value="720p" />
<xs:enumeration value="1080i" />
<xs:enumeration value="1080p" />
<xs:enumeration value="2160p" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="aspectRatioType">
<xs:restriction base="xs:string">
<xs:enumeration value="4:3" />
<xs:enumeration value="16:9" />
<xs:enumeration value="21:9" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="audioListType">
<xs:sequence>
<xs:element name="format" type="audioType" minOccurs="0"
maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>audio format, for example surround
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="audioType">
<xs:simpleContent>
<xs:extension base="audioFormatType">
<xs:attribute name="language" type="xs:language">
<xs:annotation>
<xs:documentation>code in ISO 639-2</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="materialTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="program" />
<xs:enumeration value="trailer" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="audioFormatType">
<xs:restriction base="xs:string">
<xs:enumeration value="mono" />
<xs:enumeration value="stereo" />
<xs:enumeration value="surround" />
<xs:enumeration value="5.1" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="subtitleListType">
<xs:sequence>
<xs:element name="subtitle" type="subtitleType" minOccurs="0"
maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>reference to a subtitle item, for example a
teletext page or a subtitle file
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="subtitleType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="language" type="xs:language">
<xs:annotation>
<xs:documentation>code in ISO 639-2</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="format" type="subtitleFormatType" />
<xs:attribute name="checkSumType" type="checkSumTypeType" />
<xs:attribute name="checkSumValue" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="subtitleFormatType">
<xs:restriction base="xs:string">
<xs:enumeration value="invision" />
<xs:enumeration value="teletext" />
<xs:enumeration value="dvb" />
<xs:enumeration value="ttml" />
<xs:enumeration value="srt" />
<xs:enumeration value="webvtt" />
<xs:enumeration value="pac" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="accessibilityListType">
<xs:sequence>
<xs:element name="accessibility" type="accessibilityType"
minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>reference to a accessibility item, for example a
hearing impaired subtitle
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="accessibilityType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="language" type="xs:language">
<xs:annotation>
<xs:documentation>code in ISO 639-2</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="format" type="accessibilityFormatType" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="accessibilityFormatType">
<xs:restriction base="xs:string">
<xs:enumeration value="hearingImpairedSubtitle" />
<xs:enumeration value="signLanguageInterpretation" />
<xs:enumeration value="audioDescription" />
<xs:enumeration value="spokenSubtitle" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="materialReferenceListType">
<xs:sequence>
<xs:element name="reference" type="materialReferenceType"
minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:simpleType name="materialReferenceTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="video" />
<xs:enumeration value="audio" />
<xs:enumeration value="subtitle" />
<xs:enumeration value="graphics" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="materialReferenceType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="materialReferenceTypeType">
<xs:annotation>
<xs:documentation>type of reference, for example video or audio.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="duration" use="optional">
<xs:annotation>
<xs:documentation>duration in timecode for referenced material,
example 00:00:00:00
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:attribute>
<xs:attribute name="bitrate" use="optional">
<xs:annotation>
<xs:documentation>if applicable, bitrate for the material in bps
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:attribute>
<xs:attribute name="checkSumType" type="checkSumTypeType" />
<xs:attribute name="checkSumValue" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="rightsListType">
<xs:sequence>
<xs:element name="rights" type="rightsType" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="rightsType">
<xs:annotation>
<xs:documentation>DateTime in UTC</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="validFrom" type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>start of period where right is valid
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="validTo" type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>end of period where right is valid
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="unlimitedPeriod" type="xs:boolean"
minOccurs="0">
<xs:annotation>
<xs:documentation>indicates if there is a period or not. If true,
the rightsCategory is valid until otherwise said
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="rightsCategoryList" type="rightsCategoryListType"
minOccurs="0">
<xs:annotation>
<xs:documentation>list of right categories</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="rightsCategoryListType">
<xs:sequence>
<xs:element name="rightsCategory" type="rightsCategoryType"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="rightsCategoryType">
<xs:sequence>
<xs:element name="deviceTypeList" type="deviceTypeListType">
</xs:element>
<xs:element name="priceList" type="priceListType"
minOccurs="0">
</xs:element>
<xs:element name="timeshift" type="timeShiftRightsType"
minOccurs="0">
</xs:element>
<xs:element name="blockTransmission" type="xs:boolean"
minOccurs="0">
</xs:element>
<xs:element name="blockNPVR" type="xs:boolean"
minOccurs="0">
</xs:element>
<xs:element name="outputRights" type="outputRightsType"
minOccurs="0">
</xs:element>
<xs:element name="downloadRights" type="downloadRightsType"
minOccurs="0" maxOccurs="1">
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="priceListType">
<xs:sequence>
<xs:element name="price" type="priceType"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="timeShiftRightsType">
<xs:sequence>
<xs:element name="catchUpRights" type="catchUpRightsType"
minOccurs="0" maxOccurs="1">
</xs:element>
<xs:element name="startOverRights" type="startOverRightsType"
minOccurs="0" maxOccurs="1">
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="deviceTypeListType">
<xs:sequence>
<xs:element name="deviceType" type="deviceTypeType" maxOccurs="6"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="outputRightsType">
<xs:sequence>
<xs:element name="digitalOutputRights" type="digitalOutputRightsType"
minOccurs="0">
</xs:element>
<xs:element name="analogOutputRights" type="analogOutputRightsType"
minOccurs="0">
</xs:element>
<xs:element name="inHomeNetworkOutputRights" type="inHomeNetworkOutputRightsType"
minOccurs="0">
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="deviceTypeType">
<xs:annotation>
<xs:documentation>Controls the device type
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="web" />
<xs:enumeration value="mob" />
<xs:enumeration value="tab" />
<xs:enumeration value="stb" />
<xs:enumeration value="ott" />
<xs:enumeration value="console" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="digitalOutputRightsType">
<xs:annotation>
<xs:documentation>Controls the output source for digital sources
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="unrestricted" />
<xs:enumeration value="besteffort" />
<xs:enumeration value="restricted" />
<xs:enumeration value="disallow" />
<xs:enumeration value="downresolution" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="analogOutputRightsType">
<xs:choice>
<xs:element name="unrestricted" type="xs:boolean"></xs:element>
<xs:element name="besteffort" type="cgmsaType"></xs:element>
<xs:element name="restricted" type="cgmsaType"></xs:element>
<xs:element name="disallow" type="xs:boolean"> </xs:element>
</xs:choice>
</xs:complexType>
<xs:simpleType name="cgmsaType">
<xs:annotation>
<xs:documentation>CGMS-A is standardized through the IEC, CEA,
EIA-J
and ETS
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="copyfreely" />
<xs:enumeration value="copynomore" />
<xs:enumeration value="copyonce" />
<xs:enumeration value="copynever" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="inHomeNetworkOutputRightsType">
<xs:annotation>
<xs:documentation>Controls the output source for network services
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="unrestricted" />
<xs:enumeration value="disallow" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="catchUpRightsType">
<xs:attribute name="fastForward" type="xs:boolean" use="required"></xs:attribute>
<xs:attribute name="rewind" type="xs:boolean" use="required"></xs:attribute>
<xs:attribute name="pause" type="xs:boolean" use="required"></xs:attribute>
</xs:complexType>
<xs:complexType name="startOverRightsType">
<xs:attribute name="fastForward" type="xs:boolean" use="required"></xs:attribute>
<xs:attribute name="rewind" type="xs:boolean" use="required"></xs:attribute>
<xs:attribute name="pause" type="xs:boolean" use="required"></xs:attribute>
</xs:complexType>
<xs:complexType name="priceType">
<xs:simpleContent>
<xs:extension base="xs:float">
<xs:annotation>
<xs:documentation>If omitted the the price is set to 0
</xs:documentation>
</xs:annotation>
<xs:attribute name="currency" type="currencyType" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="currencyType">
<xs:annotation>
<xs:documentation>Currency Codes according to ISO 4217
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:length value="3"></xs:length>
<xs:pattern value="[A-Z]+"></xs:pattern>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="materialListType">
<xs:sequence>
<xs:element name="material" type="materialType" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="checkSumType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="checkSumTypeType"></xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="checkSumTypeType">
<xs:annotation>
<xs:documentation>Different type of checksums
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="md5sum" />
<xs:enumeration value="sha1" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="downloadRightsType">
<xs:sequence>
<xs:element name="validFrom" type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>Start of period when download may be initiated
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="validTo" type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>end of period when download may no longer be done (does not affect viewing of the title)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="timeToLiveBeforeFirstStart" type="timeToLiveType" minOccurs="0">
<xs:annotation>
<xs:documentation>time from the time of download which the title shall be available for the customer (title may be downloaded but then only kept for a specified maximum time)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="timeToLiveAfterFirstStart" type="timeToLiveType" minOccurs="0">
<xs:annotation>
<xs:documentation>time after first start that the customer may watch the title (title may be limited to only be kept for a specified maximum time after first start)
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="maxNumberOfDownloads" type="xs:positiveInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>the maximum number of times the customer can download this title
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="timeToLiveType">
<xs:annotation>
<xs:documentation>"Time To Live" for locally stored material
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="unit" type="unitType" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="unitType">
<xs:annotation>
<xs:documentation>Time unit in milliseconds, minutes, hours or days
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="ms"></xs:enumeration>
<xs:enumeration value="min"></xs:enumeration>
<xs:enumeration value="hr"></xs:enumeration>
<xs:enumeration value="day"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="contextType">
<xs:annotation>
<xs:documentation>type of entity the metadata is refered to, content if
it is the content entity itself, series or season if the metadata
refers to series or season
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="content" />
<xs:enumeration value="series" />
<xs:enumeration value="season" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="customPropertyListType">
<xs:sequence>
<xs:element name="customProperty" type="customPropertyType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
custom properties, defined as sets of key-value pairs
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="customPropertyType">
<xs:sequence>
<xs:element name="propertyValue" type="propertyValueType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="key" type="xs:string" use="required"></xs:attribute>
</xs:complexType>
<xs:complexType name="propertyValueType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="language" type="xs:language">
<xs:annotation>
<xs:documentation>code in ISO 639-2</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="order" type="xs:int">
<xs:annotation>
<xs:documentation>
unique order where are there are a number of values for the same key, 0 is the first one (highest priority)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type" type="contextType" default="content">
<xs:annotation>
<xs:documentation>
different values for key depending on series/season/content level
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>