0
我正在嘗試使用我創建的RSS源工作。它有兩個鏈接的css和xls文檔,一個用於xsl不起作用的css作爲失敗保險箱,另一個用於xls格式化供稿時的css。 URL是在這裏:RSS中不顯示RSS
http://rockthepatch.com/rss/current-events.xml
RSS提要看起來是這樣的:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/css" href="http://www.rockthepatch.com/css/rss.css"?>
<?xml-stylesheet type="text/xsl" href="http://www.rockthepatch.com/rss/current-events.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<language>en-us</language>
<title>Upcoming Rock the Patch! Events</title>
<link>http://www.rockthepatch.com/rss/current-events.xml</link>
<description>See what's coming up below:</description>
<atom:link href="http://www.rockThePatch.com/rss/current-events.xml" rel="self" type="application/rss+xml" />
<item>
<title>Thursday's Open Mic at Ole Simms</title>
<link>https://www.facebook.com/olesimrells</link>
<description>Join Patches at open mic night at Terre Haute's Ole Simmerls Bar around 9 P.M. every Thursday.</description>
<guid>http://www.indstate.edu/mpa/sarah/rockThePatch/rss/item0001</guid>
<pubDate>Mon, 10 Oct 2011 09:15:00 EST</pubDate>
<author>[email protected] (Patches)</author>
</item>
<item>
<title>Fall Break is Here!</title>
<link>http://www.indstate.edu/academicaffairs/calendar.htm</link>
<description>School and work will not happen on Friday due to FALL BREAK!!! </description>
<guid>http://www.indstate.edu/mpa/sarah/rockThePatch/rss/item0002</guid>
<pubDate>Fri, 07 Oct 2011 02:23:00 EST</pubDate>
<author>[email protected] (Patches)</author>
</item>
</channel>
</rss>
的XSL是這樣的:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" href="http://www.rockthepatch.com/css/xsl.css" type="text/css"/>
</head>
<body>
<h2>Upcoming Rock the Patch! Events</h2>
<table border="1px">
<tr>
<th>Name of Event</th>
<th>Description</th>
<th>Date Posted</th>
<th>Author</th>
</tr>
<xsl:for-each select="rss/channel/item">
<tr>
<td>
<xsl:value-of select="title"/>
</td>
<!-- <td>
<a href="<xsl:value-of select='link'/>" title="Link">
<xsl:value-of select="link"/>
</a>
</td> -->
<td>
<xsl:value-of select="description"/>
</td>
<td>
<xsl:value-of select="pubDate"/>
</td>
<td>
<a href="mailto:[email protected]" title="[email protected]">
<xsl:value-of select="author"/>
</a>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
我不希望文件下載,但每次我點擊鏈接,它下載反對在任何瀏覽器顯示...有人可以指出我做錯了什麼?
我實際上認爲這可能是godaddy託管我研究的問題,但我仍然不確定。我向rss頭添加了type =「application/rss + xml」,但仍然沒有任何運氣。 – isuPatches
我也是這樣解釋的:Resource解釋爲Document,但是用MIME類型application/rss + xml傳遞:「http://rockthepatch.com/rss/current-events.xml」。 – isuPatches
我玩過攔截你的服務器響應的小提琴手。似乎沒有什麼幫助。網絡上有很多文獻顯示Chrome如何實施RSS Feed消耗。沒有內置的訂閱訂閱方式。 Google的建議是安裝RSS訂閱擴展。 https://chrome.google.com/webstore/detail/nlbjncdgjeocebhnmkbbbdekmmmcbfjd –