[Playlist] Compact representation of XSPF RELAX NG schema

Ryan Shaw ryanshaw at sims.berkeley.edu
Thu Oct 28 04:50:27 UTC 2004


Hi,

For those of you who use nxml-mode, here
is a .rnc version of Robert's schema.

Cheers,
Ryan
-------------- next part --------------
#    =================================================
#    Relax NG Schema for XSPF Version 0, draft 8+
# 
#    Copyright (c) 2004 Robert Kaye
# 
#    The schema is released under the Creative Commons 
#    Attribution-ShareAlike 2.0 license.
# 
#    http://creativecommons.org/licenses/by-sa/2.0/
#    =================================================
# 
# Notes: 
# 
#    Spec (8) issues:
#    1. Some element definitions lack cardinality info: 
#        license - MAY contain exactly one assumed
#        link - MAY contain zero or more assumed
#        meta - MAY contain zero or more assumed
#        trackList - MUST contain exactly one assumed
# 
#    2. The order of elements used in playlist and track should be ordered the same.
#       This schema set the order as: title, annotation, creator, info, image
# 
#    3. info is the most intuitive name for a weblink. I was expecting text in that node, not a URI
# 
#    4. trackList says: 
# 
#            xspf:track elements MUST be rendered in the order in which they appear, 
#            from top to bottom, unless a different ordering is otherwise indicated.
# 
#       How do we provide an alternative ordering? Do we need to drop that?
#       I still think we need a Normal / Shuffle indicator -> random playlists
#

default namespace = "http://xspf.org/ns/0/"

start = playlist
commonInfo =
  element title { text }?,
  element creator { text }?,
  element annotation { text }?,
  element info { xsd:anyURI }?,
  element image { xsd:anyURI }?
commonLinks =
  element link {
    attribute rel { xsd:anyURI },
    xsd:anyURI
  }*,
  element meta {
    attribute rel { xsd:anyURI },
    xsd:anyURI
  }*
playlist =
  element playlist {
    attribute version { text },
    commonInfo,
    element identifier { text }*,
    element date { xsd:date }?,
    element license { xsd:anyURI }?,
    element attribution {
      element location { xsd:anyURI }+
    }?,
    commonLinks,
    element trackList {
      element track {
        element location { xsd:anyURI }*,
        element identifier { xsd:anyURI }*,
        commonInfo,
        element album { text }?,
        element trackNum { xsd:nonNegativeInteger }?,
        element duration { xsd:nonNegativeInteger }?,
        commonLinks
      }+
    }
  }


More information about the Playlist mailing list