<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wagettyh</id>
	<title>XiphWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wagettyh"/>
	<link rel="alternate" type="text/html" href="https://wiki.xiph.org/Special:Contributions/Wagettyh"/>
	<updated>2026-05-01T08:07:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=XSPF_v1_Notes_and_Errata&amp;diff=10791</id>
		<title>XSPF v1 Notes and Errata</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=XSPF_v1_Notes_and_Errata&amp;diff=10791"/>
		<updated>2010-01-25T12:22:37Z</updated>

		<summary type="html">&lt;p&gt;Wagettyh: Fix whitespace collapse example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists errata of the XSPF version 1 document and also gives advice on using and understanding XSPF.&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;trackList&amp;gt; and &amp;lt;trackNum&amp;gt; spelling ==&lt;br /&gt;
Please note that &#039;&#039;trackList&#039;&#039; and &#039;&#039;trackNum&#039;&#039; elements MUST NOT be written&lt;br /&gt;
in all lowercase since XSPF is case-sensitive. These two&lt;br /&gt;
are the only elements containing capital letters so just remember &#039;&#039;trackList&#039;&#039;&lt;br /&gt;
and &#039;&#039;trackNum&#039;&#039; and your XSPF will be fine.&lt;br /&gt;
&lt;br /&gt;
== Absolute vs. relative URIs in key attributes ==&lt;br /&gt;
The attributes &#039;&#039;rel&#039;&#039; (&amp;lt;meta&amp;gt; and &amp;lt;link&amp;gt;) and &#039;&#039;application&#039;&#039; (&amp;lt;extension&amp;gt;)&lt;br /&gt;
are by XSPF v1 specification allowed to hold relative URIs. For example this&lt;br /&gt;
meta element is legal in XSPF v1:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;meta rel=&amp;quot;playCount&amp;quot;&amp;gt;14&amp;lt;/meta&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While this might look elegant it comes with several drawbacks:&lt;br /&gt;
* You might easily forget that this string is a URI and include non-URI characters like spaces by mistake (e.g. rel=&amp;quot;play count&amp;quot; is not valid)&lt;br /&gt;
* You lose the namespace concept: nobody will know what or whom this &#039;&#039;key&#039;&#039; belongs to or came from&lt;br /&gt;
&lt;br /&gt;
For these reasons it is strongly recommended to use absolute URIs as keys instead:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;meta rel=&amp;quot;http://example.com/track/meta/playCount/1/0/&amp;quot;&amp;gt;14&amp;lt;/meta&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version information in key attributes  ==&lt;br /&gt;
When defining you own extensions to XSPF you will have to choose&lt;br /&gt;
an application URI for your onw extensions:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;extension application=&amp;quot;http://example.com/myext/&amp;quot;&amp;gt;&lt;br /&gt;
   ..&lt;br /&gt;
 &amp;lt;/extension&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please consider including version information in your application&lt;br /&gt;
URIs and increase it whenever the structure of your extension changes:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;extension application=&amp;quot;http://example.com/xspf/track/1/0/&amp;quot;&amp;gt;&lt;br /&gt;
   ..&lt;br /&gt;
 &amp;lt;/extension&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This enables others to properly distinct different versions of your extensions&lt;br /&gt;
without the need to do &#039;&#039;version guessing&#039;&#039;.&lt;br /&gt;
Adding version information to &#039;&#039;rel&#039;&#039; of &amp;lt;meta&amp;gt; and &amp;lt;link&amp;gt; is a good idea as well:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;meta rel=&amp;quot;http://example.com/track/meta/playCount/1/0/&amp;quot;&amp;gt;14&amp;lt;/meta&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Element order ==&lt;br /&gt;
In XSPF child elements can appear in any order. That means that&lt;br /&gt;
for example both these tracks are valid for XSPF v1.&lt;br /&gt;
&lt;br /&gt;
As appearing in the specification:&lt;br /&gt;
 &amp;lt;track&amp;gt;&lt;br /&gt;
   &amp;lt;creator&amp;gt;Creator first&amp;lt;/creator&amp;gt;&lt;br /&gt;
   &amp;lt;album&amp;gt;Album after&amp;lt;/album&amp;gt;&lt;br /&gt;
 &amp;lt;/track&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also valid:&lt;br /&gt;
 &amp;lt;track&amp;gt;&lt;br /&gt;
   &amp;lt;album&amp;gt;Album first&amp;lt;/album&amp;gt;&lt;br /&gt;
   &amp;lt;creator&amp;gt;Creator after&amp;lt;/creator&amp;gt;&lt;br /&gt;
 &amp;lt;/track&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is not mentioned in the specification and might&lt;br /&gt;
have been ignored by some implementations. Thus for people&lt;br /&gt;
implementing XSPF support that means:&lt;br /&gt;
* XSPF readers must be able to deal with arbitrary element order&lt;br /&gt;
* XSPF writers should always produce XSPF files with elements in the order appearing in the specification for maximum compatibility.&lt;br /&gt;
&lt;br /&gt;
To save you extracting this information yourself the order&lt;br /&gt;
of elements appearing in the XSPF specification is:&lt;br /&gt;
* &#039;&#039;playlist&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.title&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.creator&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.annotation&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.info&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.location&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.identifier&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.image&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.date&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.license&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.attribution&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.attribution.location&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.attribution.identifier&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.link&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.meta&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.extension&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.location&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.identifier&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.title&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.creator&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.annotation&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.info&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.image&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.album&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.trackNum&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.duration&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.link&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.meta&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.extension&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whitespace==&lt;br /&gt;
Whitespace handling in XML can be a little difficult to understand at first.&lt;br /&gt;
Since XSPF is based on XML, people implementing XSPF readers or writers&lt;br /&gt;
do have to know about the basics of whitespace handling in XML.&lt;br /&gt;
The good things is we summed it up here to make things easier for you.&lt;br /&gt;
&lt;br /&gt;
=== Ignore in non-leaf elements ===&lt;br /&gt;
Whitespace in elements only holding child elements (but no text)&lt;br /&gt;
must be ignored.&lt;br /&gt;
&lt;br /&gt;
Elements affected:&lt;br /&gt;
* &#039;&#039;playlist&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.attribution&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Process in non-string leaf elements ===&lt;br /&gt;
In XSPF all elements with non-string content (i.e. of type [http://www.w3.org/TR/xmlschema-2/#dateTime dateTime], [http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger nonNegativeInteger], or [http://www.w3.org/TR/xmlschema-2/#anyURI anyURI])&lt;br /&gt;
must be process with the [http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace &amp;quot;collapse&amp;quot; method]. Sounds difficult but is easy:&lt;br /&gt;
* Leading and trailing whitespace (&#039;\t&#039;(0x08), &#039;\n&#039;(0x0a), &#039;\r&#039;(0x0d), &#039; &#039;(0x20)) is removed&lt;br /&gt;
* Whitespace &amp;quot;in the middle&amp;quot; is converted to a single space (think s/[\t\n\r ]+/ / Perl people)&lt;br /&gt;
&lt;br /&gt;
For example the three-line text&lt;br /&gt;
   ABC&lt;br /&gt;
 DEF	GHI&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
will become&lt;br /&gt;
&lt;br /&gt;
 ABC DEF GHI&lt;br /&gt;
&lt;br /&gt;
Elements affected:&lt;br /&gt;
* &#039;&#039;playlist.attribution.identifier&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.attribution.location&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.date&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.identifier&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.image&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.info&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.license&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.link&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.location&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.meta&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.duration&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.identifier&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.image&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.info&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.link&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.location&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.meta&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.trackNum&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Keep in &amp;quot;real&amp;quot; string leaf elements ===&lt;br /&gt;
Whitespace in string elements is significant and has to be preserved.&lt;br /&gt;
So if &#039;&#039;&amp;lt;annotation&amp;gt;&#039;&#039; contains line feeds the annotation text&lt;br /&gt;
really spans several lines:&lt;br /&gt;
 &amp;lt;annotation&amp;gt;Line feeds and even spaces are preserved.&lt;br /&gt;
 This example annotation spans two lines&amp;lt;/annotation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Elements affected:&lt;br /&gt;
* &#039;&#039;playlist.annotation&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.creator&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.title&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.album&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.annotation&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.creator&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.title&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Do X in Extensions ===&lt;br /&gt;
Whitespace handling inside of extension&lt;br /&gt;
elements depends on the specific extension.&lt;br /&gt;
&lt;br /&gt;
Elements affected:&lt;br /&gt;
* &#039;&#039;playlist.extension&#039;&#039;&lt;br /&gt;
* &#039;&#039;playlist.trackList.track.extension&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== URI RFC used ==&lt;br /&gt;
The XSPF v1 specification mentions RFC 2396 when talking about URIs. As [http://lists.w3.org/Archives/Public/uri/2007Jul/0001.html asking on uri@w3.org] revealed, we should have referred to &#039;&#039;STD 66&#039;&#039; instead which stands for &#039;&#039;&amp;quot;latest RFC of URI&amp;quot;&#039;&#039; (RFC 3986 as of 2007-07-09). What does that mean practically?&lt;br /&gt;
&lt;br /&gt;
This means:&lt;br /&gt;
* You can use IPv6 host part URIs in XSPF v1&lt;br /&gt;
* You should use a RFC 3986 parser for your XSPF v1 implementation&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;playlist.location&amp;gt; and privacy ==&lt;br /&gt;
Saving an absolute file location in &#039;&#039;playlist.location&#039;&#039; as is not a good idea as it has potential to hurt privacy. To give an example this playlist location&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;location&amp;gt;file:///home/bob/porn/soundtrack/ginawild34.xspf&amp;lt;/location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
might reveal information that Bob would have liked to keep private.&lt;br /&gt;
This problem is not very XSPF-specific actually, for instance [https://bugs.launchpad.net/inkscape/+bug/168958 Inkscape does this wrong with SVG].&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;playlist.location&amp;gt; vs. xml:base ==&lt;br /&gt;
&lt;br /&gt;
=== playlist.location ===&lt;br /&gt;
.. contains the (possibly relative) URI recommended to retrieve the surrounding playlist (or an updated version of it). playlist.location is &#039;&#039;not&#039;&#039; an embedded base URI used to resolve relative URIs, &#039;&#039;[[#xml:base|xml:base]]&#039;&#039; is. &#039;&#039;playlist.location&#039;&#039; can be thought of as XSPF&#039;s counterpart to [http://tools.ietf.org/html/rfc4287 Atom]&#039;s [http://tools.ietf.org/html/rfc4287#section-4.1.1 &#039;&#039;feed.link&#039;&#039;] element:&lt;br /&gt;
&lt;br /&gt;
 atom:feed elements SHOULD contain one atom:link element with a rel&lt;br /&gt;
 attribute value of &amp;quot;self&amp;quot;.  This is the preferred URI for&lt;br /&gt;
 retrieving Atom Feed Documents representing this Atom feed.&lt;br /&gt;
&lt;br /&gt;
=== xml:base ===&lt;br /&gt;
.. is an xml-wide attribute defined in [http://www.w3.org/TR/xmlbase/ XML Base].&lt;br /&gt;
The &#039;&#039;xml:base&#039;&#039; attribute can appear in any element. The Base URI for an element&lt;br /&gt;
is computed from &#039;&#039;the stack of xml:base attributes&#039;&#039;.&lt;br /&gt;
The URI in &#039;&#039;xml:base&#039;&#039; can be relative so you will need an &#039;&#039;external Base URI&#039;&#039;&lt;br /&gt;
as a &#039;&#039;backup&#039;&#039; (from [http://www.w3.org/TR/xmlbase/#rfc2396 XML Base, 4.1]):&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;s&amp;gt;The base URI is embedded in the document&#039;s content.&amp;lt;/s&amp;gt;&lt;br /&gt;
# The base URI is that of the encapsulating entity (message, document, or none).&lt;br /&gt;
# The base URI is the URI used to retrieve the entity.&lt;br /&gt;
# The base URI is defined by the context of the application.&lt;br /&gt;
&lt;br /&gt;
Here is an example of &#039;&#039;xml:base&#039;&#039; in XSPF:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;playlist version=&amp;quot;1&amp;quot; xmlns=&amp;quot;http://xspf.org/ns/0/&amp;quot; xml:base=&amp;quot;one/&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;trackList xml:base=&amp;quot;two/&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;track xml:base=&amp;quot;../../three/&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;location&amp;gt;four&amp;lt;/location&amp;gt;&lt;br /&gt;
     &amp;lt;/track&amp;gt;&lt;br /&gt;
   &amp;lt;/trackList&amp;gt;&lt;br /&gt;
 &amp;lt;/playlist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If our &#039;&#039;external Base URI&#039;&#039; would be http://example.org/ the location above would&lt;br /&gt;
resolve to http://example.org/three/four.&lt;br /&gt;
&lt;br /&gt;
Though XML Base is mentioned in the XSPF specification, the &#039;&#039;xml:base&#039;&#039; attribute is not mentioned explicitly. Both XSPF-0 and XSPF-1 support the &#039;&#039;xml:base&#039;&#039; attribute and your implementation of XSPF should do as well.&lt;br /&gt;
&lt;br /&gt;
== Role of track creator ==&lt;br /&gt;
&lt;br /&gt;
The //playlist/trackList/track/creator element is defined as &amp;quot;name of the entity (author, authors, group, company, etc) that authored the resource.&amp;quot;  However this leaves ambiguity as to the difference between performer and author.  Please note that this element might contain any one of the performer, newsreader, composer, author, etc.&lt;br /&gt;
&lt;br /&gt;
= Errata =&lt;br /&gt;
&lt;br /&gt;
== 4.1.1.2.12.2 content ==&lt;br /&gt;
This paragraph describes the content of [http://www.xspf.org/xspf-v1.html#rfc.section.4.1.1.2.12.2 &#039;&#039;playlist.meta&#039;&#039;].&lt;br /&gt;
It also reads &amp;quot;xspf:playlist elements MAY contain exactly one&amp;quot; which&lt;br /&gt;
does not make sense for the content of an element and can be safely ignored.&lt;br /&gt;
&lt;br /&gt;
== 4.1.1.2.14.1.1.1.12.2 content ==&lt;br /&gt;
This paragraph describes the content of [http://www.xspf.org/xspf-v1.html#rfc.section.4.1.1.2.14.1.1.1.12.2 &#039;&#039;playlist.trackList.track.meta&#039;&#039;].&lt;br /&gt;
It also reads &amp;quot;xspf:playlist elements MAY contain exactly one&amp;quot; which&lt;br /&gt;
does not make sense for the content of an element and can be safely ignored.&lt;br /&gt;
&lt;br /&gt;
[[Category:XSPF]]&lt;/div&gt;</summary>
		<author><name>Wagettyh</name></author>
	</entry>
</feed>