XSPF v1 Notes and Errata

From XiphWiki

Revision as of 14:19, 26 April 2007 by Sping (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page lists errata of the XSPF version 1 document and also gives advice on using and understanding XSPF.



<trackList> and <trackNum> spelling

Please not that trackList and trackNum elements MUST NOT be written in all lower-case since XSPF is case-sensitive. These two are the only elements containing capital letters so just remember trackList and trackNum and your XSPF will be fine.

Absolute vs. relative URIs in key attibutes

The attributes rel (<meta> and <link>) and application (<extension>) are by XSPF v1 specification allowed to hold relative URIs. For example this meta element is legal in XSPF v1:

<meta rel="playCount">14</meta>

While this might look elegant it comes with several drawbacks:

  • You might easily forget that this string is a URI and include non-URI characters like spaces by mistake (e.g. rel="play count" is not valid)
  • You lose the namespace concept: nobody will know what or whom this key belongs to or came from

For these reasons it is strongly recommended to use absolute URIs as keys instead:

<meta rel="http://example.com/track/meta/playCount/1/0/">14</meta>

Version information in key attributes

When defining you own extensions to XSPF you will have to choose an application URI for your onw extensions:

<extension application="http://example.com/myext/">

Please consider including version information in your application URIs and increase it whenever the structure of your extension changes:

<extension application="http://example.com/xspf/track/1/0/">

This enables others to properly distinct different versions of your extensions without the need to do version guessing. Adding version information to rel of <meta> and <link> is a good idea as well:

<meta rel="http://example.com/track/meta/playCount/1/0/">14</meta>



Personal tools

Main Page

Xiph.Org Projects