[xiph-commits] r15245 - websites/xspf.org/validation
sping at svn.xiph.org
sping at svn.xiph.org
Tue Sep 2 16:53:46 PDT 2008
Author: sping
Date: 2008-09-02 16:53:46 -0700 (Tue, 02 Sep 2008)
New Revision: 15245
Added:
websites/xspf.org/validation/xspf-0_0.7.rnc
websites/xspf.org/validation/xspf-1_0.7.rnc
Log:
XSPF Relax NG Compact Schemas 0.7
Copied: websites/xspf.org/validation/xspf-0_0.7.rnc (from rev 15242, websites/xspf.org/validation/xspf-0_0.6.rnc)
===================================================================
--- websites/xspf.org/validation/xspf-0_0.7.rnc (rev 0)
+++ websites/xspf.org/validation/xspf-0_0.7.rnc 2008-09-02 23:53:46 UTC (rev 15245)
@@ -0,0 +1,112 @@
+# ==================================================================
+# 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>
+# ==================================================================
+
+default namespace = "http://xspf.org/ns/0/"
+
+start = def_playlist-element
+xml_base-attribute = attribute xml:base { xsd:anyURI }?
+def_title-element = element title { xml_base-attribute, text }
+def_creator-element = element creator { xml_base-attribute, text }
+def_annotation-element = element annotation { xml_base-attribute, text }
+def_info-element = element info { xml_base-attribute, xsd:anyURI }
+def_location-element =
+ element location { xml_base-attribute, xsd:anyURI }
+def_identifier-element =
+ element identifier { xml_base-attribute, xsd:anyURI }
+def_image-element = element image { xml_base-attribute, xsd:anyURI }
+def_link-element =
+ element link {
+ attribute rel { xsd:anyURI },
+ xml_base-attribute,
+ xsd:anyURI
+ }
+def_meta-element =
+ element meta {
+ attribute rel { xsd:anyURI },
+ xml_base-attribute,
+ text
+ }
+def_playlist-element =
+ element playlist {
+ attribute version {
+ xsd:string { pattern = "0" }
+ },
+ xml_base-attribute,
+ (def_title-element?
+ & def_creator-element?
+ & def_annotation-element?
+ & def_info-element?
+ & def_location-element?
+ & def_identifier-element?
+ & def_image-element?
+ & element date { xml_base-attribute, xsd:dateTime }?
+ & element license { xml_base-attribute, xsd:anyURI }?
+ & def_attribution-element?
+ & def_link-element*
+ & def_meta-element*
+ & element trackList { xml_base-attribute, def_track-element+ })
+ }
+def_attribution-element =
+ element attribution {
+ xml_base-attribute, (def_identifier-element | def_location-element)*
+ }
+def_track-element =
+ element track {
+ xml_base-attribute,
+ (def_location-element*
+ & def_identifier-element*
+ & def_title-element?
+ & def_creator-element?
+ & def_annotation-element?
+ & def_info-element?
+ & def_image-element?
+ & element album { xml_base-attribute, text }?
+ & element trackNum { xml_base-attribute, xsd:nonNegativeInteger }?
+ & element duration { xml_base-attribute, xsd:nonNegativeInteger }?
+ & def_link-element*
+ & def_meta-element*)
+ }
Copied: websites/xspf.org/validation/xspf-1_0.7.rnc (from rev 15242, websites/xspf.org/validation/xspf-1_0.6.rnc)
===================================================================
--- websites/xspf.org/validation/xspf-1_0.7.rnc (rev 0)
+++ websites/xspf.org/validation/xspf-1_0.7.rnc 2008-09-02 23:53:46 UTC (rev 15245)
@@ -0,0 +1,124 @@
+# ==================================================================
+# 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>
+# 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
+# Sebastian Pipping <webmaster at hartwork.org>
+#
+# * 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
+xml_base-attribute = attribute xml:base { xsd:anyURI }?
+def_title-element = element title { xml_base-attribute, text }
+def_creator-element = element creator { xml_base-attribute, text }
+def_annotation-element = element annotation { xml_base-attribute, text }
+def_info-element = element info { xml_base-attribute, xsd:anyURI }
+def_location-element =
+ element location { xml_base-attribute, xsd:anyURI }
+def_identifier-element =
+ element identifier { xml_base-attribute, xsd:anyURI }
+def_image-element = element image { xml_base-attribute, xsd:anyURI }
+def_link-element =
+ element link {
+ attribute rel { xsd:anyURI },
+ xml_base-attribute,
+ xsd:anyURI
+ }
+def_meta-element =
+ element meta {
+ attribute rel { xsd:anyURI },
+ xml_base-attribute,
+ text
+ }
+def_extension-element =
+ element extension {
+ attribute application { xsd:anyURI },
+ xml_base-attribute,
+ (element * { def_anything }
+ | text)*
+ }
+def_playlist-element =
+ element playlist {
+ attribute version {
+ xsd:string { pattern = "1" }
+ },
+ xml_base-attribute,
+ (def_title-element?
+ & def_creator-element?
+ & def_annotation-element?
+ & def_info-element?
+ & def_location-element?
+ & def_identifier-element?
+ & def_image-element?
+ & element date { xml_base-attribute, xsd:dateTime }?
+ & element license { xml_base-attribute, xsd:anyURI }?
+ & def_attribution-element?
+ & def_link-element*
+ & def_meta-element*
+ & def_extension-element*
+ & element trackList { xml_base-attribute, def_track-element* })
+ }
+def_attribution-element =
+ element attribution {
+ xml_base-attribute, (def_identifier-element | def_location-element)*
+ }
+def_anything =
+ element * { def_anything }*
+ & attribute * { text }*
+ & text*
+def_track-element =
+ element track {
+ xml_base-attribute,
+ (def_location-element*
+ & def_identifier-element*
+ & def_title-element?
+ & def_creator-element?
+ & def_annotation-element?
+ & def_info-element?
+ & def_image-element?
+ & element album { xml_base-attribute, text }?
+ & element trackNum { xml_base-attribute, xsd:nonNegativeInteger }?
+ & element duration { xml_base-attribute, xsd:nonNegativeInteger }?
+ & def_link-element*
+ & def_meta-element*
+ & def_extension-element*)
+ }
More information about the commits
mailing list