[Playlist] CDATA in URL sections?

Lucas Gonze lgonze at panix.com
Sat May 12 19:59:54 UTC 2007


Sebastian Pipping wrote:
> ----------------------------------------------
> Would love to help, but I'm not sure
> what you mean. Please give a few
> more details in case I'm not the
> only one not sure about it.

Ivo Emanuel Gonçalves wrote:
 > CDATA isn't meant to control white space.  CDATA is to put data that
 > isn't XML.  We use it on XHTML to make the XML parser ignore CSS and
 > Javascript.


What I'm thinking about is that white space in element content might 
make it harder to parse elements that hold URLs.

Here's the situation I'm thinking of:
<location>
    http://example.com
</location>

That's legal, but the URL is invalid until you trim off the leading and 
trailing whitespace.

CDATA would be:
<location><![CDATA[http://example.com]]></location>


..but now that I type it out I realize that this would be no better. 
The party generating XSPF should just not let whitespace get into these 
elements.

Ok, thanks for listening while I figured out the answer for myself.  :)

-L




More information about the Playlist mailing list