Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Atom feed for video player does not validate, namespace issue?

Status
Not open for further replies.

tucotuco

Technical User
Nov 17, 2003
5
US
Greetings,

I'm new to xml, perhaps you can help with what I *think* is a namespace issue. Attempted to validate code at W3 XML Validator and with XML Copy Editor, but not much help is offered on how to fix the problem. I'm hoping to use this Atom feed to load videos into the JW MediaPlayer ( Would really appreciate some help on where I've gone wrong. Thanks!

Here's the code:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns=" xml:lang="en">
<title>Joe's Videos</title>
<link rel="alternate" type="text/html" href=" <link rel="self" type="application/atom+xml" href=" <updated>2005-07-17T01:10:32Z</updated>
<subtitle>Subtitle</subtitle>
<id>tag: <generator uri=" version="3.2b1">Movable Type</generator>
<entry>
<title>Killing Values</title>
<media:credit role="author">producer 1</media:credit>
<summary>Summary 1</summary>
<media:content url=" type="video/mp4"/>
<media:thumbnail url=" type="image/jpg"/>
</entry>
<entry>
<title>Measure for Measure - Act 1</title>
<media:credit role="author">producer 2</media:credit>
<summary>Summary 2</summary>
<media:content url=" type="video/mp4"/>
<media:thumbnail url=" type="image/jpg"/>
</entry>
<entry>
<title>Measure for Measure - Act 2</title>
<media:credit role="author">producer 3</media:credit>
<summary>Summary 3</summary>
<media:content url=" type="video/mp4"/>
<media:thumbnail url=" type="image/jpg"/>
</entry>
</feed>
 
[1] I suppose it is a yahoo media rss extension, hence the namespace uri ([ignore][/ignore]). If not, it is suffice to change it to the correct uri and respect the schema of it.

[2] Furthermore, certain attribute would then not conforming with the namespace (prefixed by media), specifically, it is the type attribute of media:thumbnail. Hence, I eliminate it for you to add back.

[3] There are some mandatory elements missing, such as id, updated, link which must appear in the entry elements. You have to add them.

[4] You have also to add the author to the channel element.

With all the above considerations, this is an revised feed for you to re-do. You have to discover the revisions.
[tt]
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="[ignore][/ignore]" [red]xmlns:media="[ignore][/ignore]"[/red] xml:lang="en">
<title>Joe's Videos</title>
<link rel="alternate" type="text/html" href="[ignore][/ignore]"/>
<link rel="self" type="application/atom+xml" href="[ignore][/ignore]"/>
<updated>2005-07-17T01:10:32Z</updated>
[blue]<author>
<name>John Doe</name>
</author>[/blue]
<subtitle>Subtitle</subtitle>
<id>tag: <generator uri="[ignore][/ignore]" version="3.2b1">Movable Type</generator>
<entry>
[blue]<id>[ignore][/ignore]</id>[/blue]
<title>Killing Values</title>
[blue]<updated>2009-03-08T14:39:00Z</updated>[/blue]
[blue]<link href="[ignore]./page_1[/ignore]" />[/blue]
<media:credit role="author">producer 1</media:credit>
<summary>Summary 1</summary>
<media:content url="[ignore][/ignore]" type="video/mp4"/>
<media:thumbnail url="[ignore][/ignore]"[highlight] [/highlight]/>
</entry>
<entry>
[blue]<id>[ignore][/ignore]</id>[/blue]
<title>Measure for Measure - Act 1</title>
[blue]<updated>2009-03-08T14:39:10Z</updated>
<link href="[ignore]./page_2[/ignore]" />[/blue]
<media:credit role="author">producer 2</media:credit>
<summary>Summary 2</summary>
<media:content url="[ignore][/ignore]" type="video/mp4"/>
<media:thumbnail url="[ignore][/ignore]"[highlight] [/highlight]/>
</entry>
<entry>
[blue]<id>[ignore][/ignore]</id>[/blue]
<title>Measure for Measure - Act 2</title>
[blue]<updated>2009-03-08T14:39:20Z</updated>
<link href="./page_3" />[/blue]
<media:credit role="author">producer 3</media:credit>
<summary>Summary 3</summary>
<media:content url="[ignore][/ignore]" type="video/mp4"/>
<media:thumbnail url="[ignore][/ignore]"[highlight] [/highlight]/>
</entry>
</feed>
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top