[LIB-4] Add hespiff source files
[hespiff.git] / src / main / xsd / xspf-1_0.2.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- ==================================================================
4      XML Schema for XSPF Version 1
5
6      $Id$
7
8      This schema was written as a service for developers who want
9      to validate the playlists generated by their applications.
10      Nobody claims it is perfect, so if you find bugs please report
11      them. In any case, the spec overrides this schema.
12
13      Further information about XSPF is available at http://www.xml.org
14
15
16      Copyright (c) 2005 Matthias Friedrich <matt@mafr.de>
17
18      The schema is released under the Creative Commons
19      Attribution-ShareAlike 2.0 license.
20
21      http://creativecommons.org/licenses/by-sa/2.0/
22
23
24      ChangeLog:
25           * 2005-10-12: Fixed an error: the "extension" element now
26                         has an "application" attribute, like in the spec.
27           * 2006-09-25: Fixed an error: the "attribution" element now allows
28                         "identifier" child element elements, too.
29      ================================================================== -->
30
31 <xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
32             xmlns:xspf = "http://xspf.org/ns/0/"
33             targetNamespace="http://xspf.org/ns/0/"
34             elementFormDefault="qualified"
35             attributeFormDefault="unqualified">
36
37 <xsd:element name="playlist" type="xspf:PlaylistType"/>
38
39 <xsd:complexType name="PlaylistType">
40   <xsd:sequence>
41     <xsd:element name="title" type="xsd:string" minOccurs="0" maxOccurs="1"/>
42     <xsd:element name="creator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
43     <xsd:element name="annotation" type="xsd:string" minOccurs="0" maxOccurs="1"/>
44     <xsd:element name="info" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
45     <xsd:element name="location" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
46     <xsd:element name="identifier" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
47     <xsd:element name="image" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
48     <xsd:element name="date" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
49     <xsd:element name="license" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
50     <xsd:element name="attribution" type="xspf:AttributionType" minOccurs="0" maxOccurs="1"/>
51
52     <xsd:element name="link" type="xspf:LinkType" minOccurs="0" maxOccurs="unbounded"/>
53     <xsd:element name="meta" type="xspf:MetaType" minOccurs="0" maxOccurs="unbounded"/>
54     <xsd:element name="extension" type="xspf:ExtensionType" minOccurs="0" maxOccurs="unbounded"/>
55
56     <xsd:element name="trackList" type="xspf:TrackListType" minOccurs="1" maxOccurs="1"/>
57   </xsd:sequence>
58   <xsd:attribute name="version" type="xspf:VersionType" use="required"/>
59 </xsd:complexType>
60
61 <xsd:simpleType name="VersionType">
62   <xsd:restriction base="xsd:string">
63     <xsd:pattern value="1"/>
64   </xsd:restriction>
65 </xsd:simpleType>
66
67 <xsd:complexType name="AttributionType">
68   <xsd:choice minOccurs="0" maxOccurs="unbounded">
69     <xsd:element name="identifier" type="xsd:anyURI"/>
70     <xsd:element name="location" type="xsd:anyURI"/>
71   </xsd:choice>
72 </xsd:complexType>
73
74 <xsd:complexType name="LinkType">
75   <xsd:simpleContent>
76     <xsd:extension base="xsd:anyURI">
77       <xsd:attribute name="rel" type="xsd:anyURI" use="required"/>
78     </xsd:extension>
79   </xsd:simpleContent>
80 </xsd:complexType>
81
82 <xsd:complexType name="MetaType">
83   <xsd:simpleContent>
84     <xsd:extension base="xsd:string">
85       <xsd:attribute name="rel" type="xsd:anyURI" use="required"/>
86     </xsd:extension>
87   </xsd:simpleContent>
88 </xsd:complexType>
89
90 <xsd:complexType name="ExtensionType">
91   <xsd:complexContent mixed="true">
92     <xsd:restriction base="xsd:anyType">
93       <xsd:sequence>
94         <xsd:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
95       </xsd:sequence>
96       <xsd:attribute name="application" type="xsd:anyURI" use="required"/>
97     </xsd:restriction>
98   </xsd:complexContent>
99 </xsd:complexType>
100
101 <xsd:complexType name="TrackListType">
102   <xsd:sequence>
103     <xsd:element name="track" type="xspf:TrackType" minOccurs="0" maxOccurs="unbounded"/>
104   </xsd:sequence>
105 </xsd:complexType>
106
107 <xsd:complexType name="TrackType">
108   <xsd:sequence>
109     <xsd:element name="location" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
110     <xsd:element name="identifier" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
111     <xsd:element name="title" type="xsd:string" minOccurs="0" maxOccurs="1"/>
112     <xsd:element name="creator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
113     <xsd:element name="annotation" type="xsd:string" minOccurs="0" maxOccurs="1"/>
114     <xsd:element name="info" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
115     <xsd:element name="image" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
116     <xsd:element name="album" type="xsd:string" minOccurs="0" maxOccurs="1"/>
117     <xsd:element name="trackNum" type="xsd:nonNegativeInteger" minOccurs="0" maxOccurs="1"/>
118     <xsd:element name="duration" type="xsd:nonNegativeInteger" minOccurs="0" maxOccurs="1"/>
119
120     <xsd:element name="link" type="xspf:LinkType" minOccurs="0" maxOccurs="unbounded"/>
121     <xsd:element name="meta" type="xspf:MetaType" minOccurs="0" maxOccurs="unbounded"/>
122     <xsd:element name="extension" type="xspf:ExtensionType" minOccurs="0" maxOccurs="unbounded"/>
123   </xsd:sequence>
124 </xsd:complexType>
125
126 </xsd:schema>