[xiph-commits] r15137 - websites/xspf.org/validation

sping at svn.xiph.org sping at svn.xiph.org
Sat Jul 26 10:38:37 PDT 2008


Author: sping
Date: 2008-07-26 10:38:36 -0700 (Sat, 26 Jul 2008)
New Revision: 15137

Added:
   websites/xspf.org/validation/xspf-0_0.6.rnc
   websites/xspf.org/validation/xspf-0_0.6.rng
   websites/xspf.org/validation/xspf-1_0.6.rnc
   websites/xspf.org/validation/xspf-1_0.6.rng
Modified:
   websites/xspf.org/validation/index.shtml.en
Log:
Add xml:base support to Relax NG XSPF schema

Modified: websites/xspf.org/validation/index.shtml.en
===================================================================
--- websites/xspf.org/validation/index.shtml.en	2008-07-26 15:18:49 UTC (rev 15136)
+++ websites/xspf.org/validation/index.shtml.en	2008-07-26 17:38:36 UTC (rev 15137)
@@ -21,16 +21,16 @@
         <a href="http://validator.xspf.org/">Online XSPF validator</a> by Sebastian Pipping.
       </li>
       <li style="margin-bottom: 1em;">
-        <a href="xspf-1_0.5.rng">Relax NG (XML) Schema for XSPF-1</a> by Matthias Friedrich.  Sample usage of <a href="http://xmlstar.sourceforge.net/">XMLStarlet</a>:
-        <pre>(Unix)     xmlstarlet validate -e -r xspf-1_0.5.rng myplaylist.xspf
-(Windows)  xml.exe validate -e -r xspf-1_0.5.rng myplaylist.xspf</pre>
-        There also exists a schema for <a href="xspf-0_0.5.rng">XSPF-0</a>, but working with XSPF-1 should be preferred.
+        <a href="xspf-1_0.6.rng">Relax NG (XML) Schema for XSPF-1</a> by Matthias Friedrich.  Sample usage of <a href="http://xmlstar.sourceforge.net/">XMLStarlet</a>:
+        <pre>(Unix)     xmlstarlet validate -e -r xspf-1_0.6.rng myplaylist.xspf
+(Windows)  xml.exe validate -e -r xspf-1_0.6.rng myplaylist.xspf</pre>
+        There also exists a schema for <a href="xspf-0_0.6.rng">XSPF-0</a>, but working with XSPF-1 should be preferred.
       </li>
       <li style="margin-bottom: 1em;">
-        <a href="xspf-1_0.5.rnc">Relax NG (Compact) Schema for XSPF-1</a> by Matthias Friedrich.  Sample usage of <a href="http://sourceforge.net/projects/rnv/">RNV</a>:
-        <pre>(Unix)     rnv xspf-1_0.5.rnc myplaylist.xspf
-(Windows)  rnv xspf-1_0.5.rnc myplaylist.xspf</pre>
-        There also exists a schema for <a href="xspf-0_0.5.rnc">XSPF-0</a>, but working with XSPF-1 should be preferred.
+        <a href="xspf-1_0.6.rnc">Relax NG (Compact) Schema for XSPF-1</a> by Matthias Friedrich.  Sample usage of <a href="http://sourceforge.net/projects/rnv/">RNV</a>:
+        <pre>(Unix)     rnv xspf-1_0.6.rnc myplaylist.xspf
+(Windows)  rnv xspf-1_0.6.rnc myplaylist.xspf</pre>
+        There also exists a schema for <a href="xspf-0_0.6.rnc">XSPF-0</a>, but working with XSPF-1 should be preferred.
       </li>
       <li>
         <a href="http://libspiff.sourceforge.net/">spiff_check of libSpiff</a> by Sebastian Pipping.  Sample usage of spiff_check:

Copied: websites/xspf.org/validation/xspf-0_0.6.rnc (from rev 15135, websites/xspf.org/validation/xspf-0_0.5.rnc)
===================================================================
--- websites/xspf.org/validation/xspf-0_0.6.rnc	                        (rev 0)
+++ websites/xspf.org/validation/xspf-0_0.6.rnc	2008-07-26 17:38:36 UTC (rev 15137)
@@ -0,0 +1,99 @@
+# ==================================================================
+# 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>
+# 
+# The schema is released under the Creative Commons 
+# Attribution-ShareAlike 2.5 license.
+# 
+# http://creativecommons.org/licenses/by-sa/2.5/
+# 
+# 
+# ChangeLog:
+#  * 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: Trang-friendly transformation of def_anything
+#                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>
+# ==================================================================
+
+default namespace = "http://xspf.org/ns/0/"
+
+start = def_playlist-element
+def_playlist-element =
+  element playlist {
+    attribute version {
+      xsd:string { pattern = "0" }
+    },
+    attribute xml:base {
+      xsd:anyURI
+    }?,
+    (element title { text }?
+     & element creator { text }?
+     & element annotation { text }?
+     & element info { xsd:anyURI }?
+     & element location { xsd:anyURI }?
+     & element identifier { xsd:anyURI }?
+     & element image { xsd:anyURI }?
+     & element date { xsd:dateTime }?
+     & element license { xsd:anyURI }?
+     & def_attribution-element?
+     & def_link-element*
+     & def_meta-element*
+     & element trackList { def_track-element, def_track-element* })
+  }
+def_attribution-element =
+  element attribution {
+    (element identifier { xsd:anyURI }
+     | element location { xsd:anyURI })*
+  }
+def_link-element =
+  element link {
+    attribute rel { xsd:anyURI },
+    xsd:anyURI
+  }
+def_meta-element =
+  element meta {
+    attribute rel { xsd:anyURI },
+    text
+  }
+def_track-element =
+  element track {
+    element location { xsd:anyURI }*
+    & element identifier { xsd:anyURI }*
+    & element title { text }?
+    & element creator { text }?
+    & element annotation { text }?
+    & element info { xsd:anyURI }?
+    & element image { xsd:anyURI }?
+    & element album { text }?
+    & element trackNum { xsd:nonNegativeInteger }?
+    & element duration { xsd:nonNegativeInteger }?
+    & def_link-element*
+    & def_meta-element*
+  }

Copied: websites/xspf.org/validation/xspf-0_0.6.rng (from rev 15135, websites/xspf.org/validation/xspf-0_0.5.rng)
===================================================================
--- websites/xspf.org/validation/xspf-0_0.6.rng	                        (rev 0)
+++ websites/xspf.org/validation/xspf-0_0.6.rng	2008-07-26 17:38:36 UTC (rev 15137)
@@ -0,0 +1,243 @@
+<?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>
+
+     The schema is released under the Creative Commons 
+     Attribution-ShareAlike 2.5 license.
+
+     http://creativecommons.org/licenses/by-sa/2.5/
+
+
+     ChangeLog:
+      * 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: Trang-friendly transformation of def_anything
+                    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="def_playlist-element">
+        <element name="playlist">
+            <attribute name="version">
+                <data type="string">
+                    <param name="pattern">0</param>
+                </data>
+            </attribute>
+            <optional>
+                <attribute name="xml:base">
+                    <data type="anyURI"/>
+                </attribute>
+            </optional>
+
+            <interleave>
+                <optional>
+                    <element name="title">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="creator">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="annotation">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="info">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="location">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="identifier">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="image">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="date">
+                        <data type="dateTime"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="license">
+                        <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="def_track-element"/>
+                    <zeroOrMore>
+                        <ref name="def_track-element"/>
+                    </zeroOrMore>
+                </element>
+            </interleave>
+        </element>
+    </define>
+
+
+    <define name="def_attribution-element">
+        <element name="attribution">
+            <zeroOrMore>
+                <choice>
+                    <element name="identifier">
+                        <data type="anyURI"/>
+                    </element>
+                    <element name="location">
+                        <data type="anyURI"/>
+                    </element>
+                </choice>
+            </zeroOrMore>
+        </element>
+    </define>
+
+
+    <define name="def_link-element">
+        <element name="link">
+            <attribute name="rel">
+                <data type="anyURI"/>
+            </attribute>
+
+            <data type="anyURI"/>
+        </element>
+    </define>
+
+
+    <define name="def_meta-element">
+        <element name="meta">
+            <attribute name="rel">
+                <data type="anyURI"/>
+            </attribute>
+
+            <text />
+        </element>
+    </define>
+
+
+    <define name="def_track-element">
+        <element name="track">
+            <interleave>
+                <zeroOrMore>
+                    <element name="location">
+                        <data type="anyURI"/>
+                    </element>
+                </zeroOrMore>
+                <zeroOrMore>
+                    <element name="identifier">
+                        <data type="anyURI"/>
+                    </element>
+                </zeroOrMore>
+
+                <optional>
+                    <element name="title">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="creator">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="annotation">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="info">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="image">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="album">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="trackNum">
+                        <data type="nonNegativeInteger"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="duration">
+                        <data type="nonNegativeInteger"/>
+                    </element>
+                </optional>
+
+                <zeroOrMore>
+                    <ref name="def_link-element"/>
+                </zeroOrMore>
+                <zeroOrMore>
+                    <ref name="def_meta-element"/>
+                </zeroOrMore>
+            </interleave>
+        </element>
+    </define>
+
+</grammar>

Copied: websites/xspf.org/validation/xspf-1_0.6.rnc (from rev 15135, websites/xspf.org/validation/xspf-1_0.5.rnc)
===================================================================
--- websites/xspf.org/validation/xspf-1_0.6.rnc	                        (rev 0)
+++ websites/xspf.org/validation/xspf-1_0.6.rnc	2008-07-26 17:38:36 UTC (rev 15137)
@@ -0,0 +1,108 @@
+# ==================================================================
+# Relax NG Schema for XSPF Version 1
+# 
+# $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>
+# 
+# The schema is released under the Creative Commons 
+# Attribution-ShareAlike 2.5 license.
+# 
+# http://creativecommons.org/licenses/by-sa/2.5/
+# 
+# 
+# ChangeLog:
+#  * 2008-07-26: Support for xml:base attribute
+#                Sebastian Pipping <webmaster at hartwork.org>
+# 
+#  * 2007-02-16: Trang-friendly transformation of def_anything
+#                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>
+# ==================================================================
+
+default namespace = "http://xspf.org/ns/0/"
+
+start = def_playlist-element
+def_playlist-element =
+  element playlist {
+    attribute version {
+      xsd:string { pattern = "1" }
+    },
+    attribute xml:base {
+      xsd:anyURI
+    }?,
+    (element title { text }?
+     & element creator { text }?
+     & element annotation { text }?
+     & element info { xsd:anyURI }?
+     & element location { xsd:anyURI }?
+     & element identifier { xsd:anyURI }?
+     & element image { xsd:anyURI }?
+     & element date { xsd:dateTime }?
+     & element license { xsd:anyURI }?
+     & def_attribution-element?
+     & def_link-element*
+     & def_meta-element*
+     & def_extension-element*
+     & element trackList { def_track-element* })
+  }
+def_attribution-element =
+  element attribution {
+    (element identifier { xsd:anyURI }
+     | element location { xsd:anyURI })*
+  }
+def_link-element =
+  element link {
+    attribute rel { xsd:anyURI },
+    xsd:anyURI
+  }
+def_meta-element =
+  element meta {
+    attribute rel { xsd:anyURI },
+    text
+  }
+def_extension-element =
+  element extension {
+    attribute application { xsd:anyURI },
+    (element * { def_anything }
+     | text)*
+  }
+def_anything =
+  element * { def_anything }*
+  & attribute * { text }*
+  & text*
+def_track-element =
+  element track {
+    element location { xsd:anyURI }*
+    & element identifier { xsd:anyURI }*
+    & element title { text }?
+    & element creator { text }?
+    & element annotation { text }?
+    & element info { xsd:anyURI }?
+    & element image { xsd:anyURI }?
+    & element album { text }?
+    & element trackNum { xsd:nonNegativeInteger }?
+    & element duration { xsd:nonNegativeInteger }?
+    & def_link-element*
+    & def_meta-element*
+    & def_extension-element*
+  }

Copied: websites/xspf.org/validation/xspf-1_0.6.rng (from rev 15135, websites/xspf.org/validation/xspf-1_0.5.rng)
===================================================================
--- websites/xspf.org/validation/xspf-1_0.6.rng	                        (rev 0)
+++ websites/xspf.org/validation/xspf-1_0.6.rng	2008-07-26 17:38:36 UTC (rev 15137)
@@ -0,0 +1,286 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ==================================================================
+     Relax NG Schema for XSPF Version 1
+
+     $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>
+
+     The schema is released under the Creative Commons 
+     Attribution-ShareAlike 2.5 license.
+
+     http://creativecommons.org/licenses/by-sa/2.5/
+
+
+     ChangeLog:
+      * 2008-07-26: Support for xml:base attribute
+                    Sebastian Pipping <webmaster at hartwork.org>
+
+      * 2007-02-16: Trang-friendly transformation of def_anything
+                    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="def_playlist-element">
+        <element name="playlist">
+            <attribute name="version">
+                <data type="string">
+                    <param name="pattern">1</param>
+                </data>
+            </attribute>
+            <optional>
+                <attribute name="xml:base">
+                    <data type="anyURI"/>
+                </attribute>
+            </optional>
+
+            <interleave>
+                <optional>
+                    <element name="title">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="creator">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="annotation">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="info">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="location">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="identifier">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="image">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="date">
+                        <data type="dateTime"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="license">
+                        <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>
+                <zeroOrMore>
+                    <ref name="def_extension-element"/>
+                </zeroOrMore>
+
+                <element name="trackList">
+                    <zeroOrMore>
+                        <ref name="def_track-element"/>
+                    </zeroOrMore>
+                </element>
+            </interleave>
+        </element>
+    </define>
+
+
+    <define name="def_attribution-element">
+        <element name="attribution">
+            <zeroOrMore>
+                <choice>
+                    <element name="identifier">
+                        <data type="anyURI"/>
+                    </element>
+                    <element name="location">
+                        <data type="anyURI"/>
+                    </element>
+                </choice>
+            </zeroOrMore>
+        </element>
+    </define>
+
+
+    <define name="def_link-element">
+        <element name="link">
+            <attribute name="rel">
+                <data type="anyURI"/>
+            </attribute>
+
+            <data type="anyURI"/>
+        </element>
+    </define>
+
+
+    <define name="def_meta-element">
+        <element name="meta">
+            <attribute name="rel">
+                <data type="anyURI"/>
+            </attribute>
+
+            <text />
+        </element>
+    </define>
+
+
+    <define name="def_extension-element">
+        <element name="extension">
+            <attribute name="application">
+                <data type="anyURI"/>
+            </attribute>
+
+            <zeroOrMore>
+                <choice>
+                    <element>
+                        <anyName/>
+                        <ref name="def_anything"/>
+                    </element>
+                    <text/>
+                </choice>
+            </zeroOrMore>
+        </element>
+    </define>
+
+
+    <define name="def_anything">
+        <interleave>
+            <zeroOrMore>
+                <element>
+                    <anyName/>
+                    <ref name="def_anything"/>
+                </element>
+            </zeroOrMore>
+
+            <zeroOrMore>
+                <attribute>
+                    <anyName/>
+                </attribute>
+            </zeroOrMore>
+
+            <zeroOrMore>
+                <text/>
+            </zeroOrMore>
+        </interleave>
+    </define>
+
+
+    <define name="def_track-element">
+        <element name="track">
+            <interleave>
+                <zeroOrMore>
+                    <element name="location">
+                        <data type="anyURI"/>
+                    </element>
+                </zeroOrMore>
+                <zeroOrMore>
+                    <element name="identifier">
+                        <data type="anyURI"/>
+                    </element>
+                </zeroOrMore>
+
+                <optional>
+                    <element name="title">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="creator">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="annotation">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="info">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="image">
+                        <data type="anyURI"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="album">
+                        <text/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="trackNum">
+                        <data type="nonNegativeInteger"/>
+                    </element>
+                </optional>
+                <optional>
+                    <element name="duration">
+                        <data type="nonNegativeInteger"/>
+                    </element>
+                </optional>
+
+                <zeroOrMore>
+                    <ref name="def_link-element"/>
+                </zeroOrMore>
+                <zeroOrMore>
+                    <ref name="def_meta-element"/>
+                </zeroOrMore>
+                <zeroOrMore>
+                    <ref name="def_extension-element"/>
+                </zeroOrMore>
+            </interleave>
+        </element>
+    </define>
+
+</grammar>



More information about the commits mailing list