XSL - FF媒体中的未知错误:content / @ url

时间:2009-09-30 19:46:34

标签: xslt

当我在我的XSLT中尝试这个时,我一直收到“发生未知错误”:

<table class="TEDtalks">

    <xsl:for-each select="/rss/channel/item">
    <tr>

    <td><xsl:value-of select="title"/></td>

    <td>

    <xsl:value-of select="media:content/@url" />
    </td>

    </tr>
    </xsl:for-each>
</table>

XML

<rss>
<channel>
<item>

                    <title>TEDTalks : Karen Armstrong: Let's revive the Golden Rule - Karen Armstrong (2009)</title>
                    <itunes:author>Karen Armstrong</itunes:author>
                    <description>Weeks from the Charter for Compassion launch, Karen Armstrong looks at religion's role in the 21st century: Will its dogmas divide us? Or will it unite us for common good? She reviews the catalysts that can drive the world's faiths to rediscover the Golden Rule.&lt;img src="http://feeds.feedburner.com/~r/TEDTalks_video/~4/th6FBgvV22o" height="1" width="1"/&gt;</description>
                    <itunes:subtitle>Karen Armstrong: Let's revive the Golden Rule</itunes:subtitle>
                    <itunes:summary><![CDATA[Weeks from the Charter for Compassion launch, Karen Armstrong looks at religion's role in the 21st century: Will its dogmas divide us? Or will it unite us for common good? She reviews the catalysts that can drive the world's faiths to rediscover the Golden Rule.]]></itunes:summary>

                    <link>http://feedproxy.google.com/~r/TEDTalks_video/~3/th6FBgvV22o/647</link>

                    <guid isPermaLink="false">http://video.ted.com/talks/podcast/KarenArmstrong_2009G.mp4</guid>
                    <pubDate>Tue, 29 Sep 2009 12:46:00 -0500</pubDate>
                    <category>Higher Education</category>
                    <itunes:explicit>no</itunes:explicit>
                    <itunes:duration>00:09:54</itunes:duration>
                    <itunes:keywords>TED</itunes:keywords>

                    <media:content url="http://feedproxy.google.com/~r/TEDTalks_video/~5/XT8k_DqlzGc/KarenArmstrong_2009G.mp4" fileSize="33726021" type="video/mp4" />

1 个答案:

答案 0 :(得分:0)

您是否定义了media: xml名称空间前缀? E.g:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:media="http://search.yahoo.com/mrss/"
                ...