1 <?xml version="1.0" encoding="UTF-8"?>
3 <!-- ==================================================================
4 XML Schema for XSPF Version 1
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.
13 Further information about XSPF is available at http://www.xml.org
16 Copyright (c) 2005 Matthias Friedrich <matt@mafr.de>
18 The schema is released under the Creative Commons
19 Attribution-ShareAlike 2.0 license.
21 http://creativecommons.org/licenses/by-sa/2.0/
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 ================================================================== -->
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">
37 <xsd:element name="playlist" type="xspf:PlaylistType"/>
39 <xsd:complexType name="PlaylistType">
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"/>
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"/>
56 <xsd:element name="trackList" type="xspf:TrackListType" minOccurs="1" maxOccurs="1"/>
58 <xsd:attribute name="version" type="xspf:VersionType" use="required"/>
61 <xsd:simpleType name="VersionType">
62 <xsd:restriction base="xsd:string">
63 <xsd:pattern value="1"/>
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"/>
74 <xsd:complexType name="LinkType">
76 <xsd:extension base="xsd:anyURI">
77 <xsd:attribute name="rel" type="xsd:anyURI" use="required"/>
82 <xsd:complexType name="MetaType">
84 <xsd:extension base="xsd:string">
85 <xsd:attribute name="rel" type="xsd:anyURI" use="required"/>
90 <xsd:complexType name="ExtensionType">
91 <xsd:complexContent mixed="true">
92 <xsd:restriction base="xsd:anyType">
94 <xsd:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
96 <xsd:attribute name="application" type="xsd:anyURI" use="required"/>
101 <xsd:complexType name="TrackListType">
103 <xsd:element name="track" type="xspf:TrackType" minOccurs="0" maxOccurs="unbounded"/>
107 <xsd:complexType name="TrackType">
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"/>
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"/>