[xiph-commits] r15244 - websites/xspf.org/validation
sping at svn.xiph.org
sping at svn.xiph.org
Tue Sep 2 16:22:45 PDT 2008
Author: sping
Date: 2008-09-02 16:22:45 -0700 (Tue, 02 Sep 2008)
New Revision: 15244
Added:
websites/xspf.org/validation/xspf-0_0.7.rng
Log:
XSPF-0 version of XSPF Relax NG Schema 0.7
Copied: websites/xspf.org/validation/xspf-0_0.7.rng (from rev 15242, websites/xspf.org/validation/xspf-1_0.7.rng)
===================================================================
--- websites/xspf.org/validation/xspf-0_0.7.rng (rev 0)
+++ websites/xspf.org/validation/xspf-0_0.7.rng 2008-09-02 23:22:45 UTC (rev 15244)
@@ -0,0 +1,286 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ==================================================================
+ Relax NG Schema for XSPF Version 0
+
+ $Id$
+
+ This schema was written as a service for developers who want
+ to validate the playlists generated by their applications.
+ Nobody claims it is perfect, so if you find bugs please report
+ them. In any case, the spec overrides this schema.
+
+ Further information about XSPF is available at http://www.xspf.org
+
+
+ Copyright (c) 2005 Matthias Friedrich <matt at mafr.de>
+ Copyright (c) 2007-2008 Sebastian Pipping <webmaster at hartwork.org>
+
+ The schema is released under the Creative Commons
+ Attribution-ShareAlike 2.5 license.
+
+ http://creativecommons.org/licenses/by-sa/2.5/
+
+
+ ChangeLog:
+ * 2008-09-03: Allow xml:base attribute everywhere
+ Extract common elements
+ Fix zeroOrMore to oneOrMore for track in trackList
+ Sebastian Pipping <webmaster at hartwork.org>
+
+ * 2008-07-26: Support for xml:base attribute
+ Sebastian Pipping <webmaster at hartwork.org>
+
+ * 2007-05-02: XSPF-0 schema extracted from XSPF-1 edition
+ Sebastian Pipping <webmaster at hartwork.org>
+
+ * 2007-02-16: Interleave wrap for track and playlist
+ to allow arbitrary element order
+ Sebastian Pipping <webmaster at hartwork.org>
+
+ * 2007-01-07: The info element's content has been changed from
+ type "text" to "anyURI", as per spec.
+ Matthias Friedrich <matt at mafr.de>
+
+ * 2006-09-25: Fixed an error: the "attribution" element now allows
+ "identifier" child element elements, too.
+ Matthias Friedrich <matt at mafr.de>
+ ================================================================== -->
+
+
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
+ ns="http://xspf.org/ns/0/">
+
+
+ <start>
+ <ref name="def_playlist-element"/>
+ </start>
+
+
+ <define name="xml_base-attribute">
+ <optional>
+ <attribute name="xml:base">
+ <data type="anyURI"/>
+ </attribute>
+ </optional>
+ </define>
+
+
+ <define name="def_title-element">
+ <element name="title">
+ <ref name="xml_base-attribute"/>
+ <text/>
+ </element>
+ </define>
+
+
+ <define name="def_creator-element">
+ <element name="creator">
+ <ref name="xml_base-attribute"/>
+ <text/>
+ </element>
+ </define>
+
+
+ <define name="def_annotation-element">
+ <element name="annotation">
+ <ref name="xml_base-attribute"/>
+ <text/>
+ </element>
+ </define>
+
+
+ <define name="def_info-element">
+ <element name="info">
+ <ref name="xml_base-attribute"/>
+ <data type="anyURI"/>
+ </element>
+ </define>
+
+
+ <define name="def_location-element">
+ <element name="location">
+ <ref name="xml_base-attribute"/>
+ <data type="anyURI"/>
+ </element>
+ </define>
+
+
+ <define name="def_identifier-element">
+ <element name="identifier">
+ <ref name="xml_base-attribute"/>
+ <data type="anyURI"/>
+ </element>
+ </define>
+
+
+ <define name="def_image-element">
+ <element name="image">
+ <ref name="xml_base-attribute"/>
+ <data type="anyURI"/>
+ </element>
+ </define>
+
+
+ <define name="def_link-element">
+ <element name="link">
+ <attribute name="rel">
+ <data type="anyURI"/>
+ </attribute>
+ <ref name="xml_base-attribute"/>
+
+ <data type="anyURI"/>
+ </element>
+ </define>
+
+
+ <define name="def_meta-element">
+ <element name="meta">
+ <attribute name="rel">
+ <data type="anyURI"/>
+ </attribute>
+ <ref name="xml_base-attribute"/>
+
+ <text />
+ </element>
+ </define>
+
+
+ <define name="def_playlist-element">
+ <element name="playlist">
+ <attribute name="version">
+ <data type="string">
+ <param name="pattern">0</param>
+ </data>
+ </attribute>
+ <ref name="xml_base-attribute"/>
+
+ <interleave>
+ <optional>
+ <ref name="def_title-element"/>
+ </optional>
+ <optional>
+ <ref name="def_creator-element"/>
+ </optional>
+ <optional>
+ <ref name="def_annotation-element"/>
+ </optional>
+ <optional>
+ <ref name="def_info-element"/>
+ </optional>
+ <optional>
+ <ref name="def_location-element"/>
+ </optional>
+ <optional>
+ <ref name="def_identifier-element"/>
+ </optional>
+ <optional>
+ <ref name="def_image-element"/>
+ </optional>
+ <optional>
+ <element name="date">
+ <ref name="xml_base-attribute"/>
+ <data type="dateTime"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="license">
+ <ref name="xml_base-attribute"/>
+ <data type="anyURI"/>
+ </element>
+ </optional>
+
+ <optional>
+ <ref name="def_attribution-element"/>
+ </optional>
+
+ <zeroOrMore>
+ <ref name="def_link-element"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="def_meta-element"/>
+ </zeroOrMore>
+
+ <element name="trackList">
+ <ref name="xml_base-attribute"/>
+ <oneOrMore>
+ <ref name="def_track-element"/>
+ </oneOrMore>
+ </element>
+ </interleave>
+ </element>
+ </define>
+
+
+ <define name="def_attribution-element">
+ <element name="attribution">
+ <ref name="xml_base-attribute"/>
+
+ <zeroOrMore>
+ <choice>
+ <ref name="def_identifier-element"/>
+ <ref name="def_location-element"/>
+ </choice>
+ </zeroOrMore>
+ </element>
+ </define>
+
+
+ <define name="def_track-element">
+ <element name="track">
+ <ref name="xml_base-attribute"/>
+
+ <interleave>
+ <zeroOrMore>
+ <ref name="def_location-element"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="def_identifier-element"/>
+ </zeroOrMore>
+
+ <optional>
+ <ref name="def_title-element"/>
+ </optional>
+ <optional>
+ <ref name="def_creator-element"/>
+ </optional>
+ <optional>
+ <ref name="def_annotation-element"/>
+ </optional>
+ <optional>
+ <ref name="def_info-element"/>
+ </optional>
+ <optional>
+ <ref name="def_image-element"/>
+ </optional>
+ <optional>
+ <element name="album">
+ <ref name="xml_base-attribute"/>
+ <text/>
+ </element>
+ </optional>
+ <optional>
+ <element name="trackNum">
+ <ref name="xml_base-attribute"/>
+ <data type="nonNegativeInteger"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="duration">
+ <ref name="xml_base-attribute"/>
+ <data type="nonNegativeInteger"/>
+ </element>
+ </optional>
+
+ <zeroOrMore>
+ <ref name="def_link-element"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="def_meta-element"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
+</grammar>
More information about the commits
mailing list