[Home] [By Thread] [By Date] [Recent Entries]
I had an xsl file which pulled and sorted an rss feed to get some data. But it suddendly stopped working last friday. I tried debugging but cant figure it out so was hoping someone could provide some pointers on what the problem could be... Although I can connect to the xml feed fine via web browser, not sure why java giving me a error: "FODC0005: java.net.ConnectException: Connection refused: connect" I was hoping someone can run the xsl code and let me know if they get same error (ill run later tonight from home). Its supposed to create a weather.xml file for me... A. I thought at 1st maybe the firewall at work was blocking it, but i doubt that since 1. I can connect to the feed via web browser from the computer which is trying to pull info from the website, and i assume web browser and java both use port 80 to get http info. so firewall should have blocked both if that were the case. 2. I cannot connect to an unrelated traffic rss feed website either. B. Then I thought it could be the weather website blocking me since I pull info every hour from it (they have a 1hr use policy). But a traffic rss feed from another website I never used wont connect either. plus again I can visit the site via browser. Anyone have some ideas? Thanks in advance
and the code in that file: ################################################### <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:output encoding="ISO-8859-1" indent="yes" media-type="xml" /> <xsl:param name="weatherRSS" http://www.rssweather.com/rss.php?config=&forecast=zandh&place=philadelphia&state=pa&zipcode=&country=us&county=42101&zone=paz071&alt=rss20a</xsl:param>
<xsl:template match="/"> <xsl:result-document href="weather.xml" method="xml" encoding="UTF-8"> <weather> <xsl:apply-templates select="document($weatherRSS)/*"/> </weather> </xsl:result-document> </xsl:template> <xsl:template match="channel/link"> <xsl:attribute name="link"> <xsl:value-of select="."/> </xsl:attribute> </xsl:template> <xsl:template match="item"> <item> <xsl:apply-templates/> </item> </xsl:template> <xsl:template match="item/title"> <title> <xsl:value-of select="."/> </title> </xsl:template> <xsl:template match="item/description"> <description> <xsl:value-of select="."/> </description> </xsl:template> <xsl:template match="*"> <xsl:apply-templates/> </xsl:template> <xsl:template match="text()"/> </xsl:stylesheet> ################################################### Also this next file wont connect either to another website (http://www.traffic.com/feeds/rss_philadelphia.xml): ################################################### <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:output encoding="ISO-8859-1" indent="yes" media-type="xml" /> <xsl:param name="trafficRSS">http://www.traffic.com/feeds/rss_philadelphia.xml</xsl:param> <xsl:template match="/"> <xsl:result-document href="traffic.xml" method="xml" encoding="UTF-8"> <traffic> <xsl:apply-templates select="document($trafficRSS)/*"/> </traffic> </xsl:result-document> </xsl:template> <xsl:template match="channel/link"> <xsl:attribute name="link"> <xsl:value-of select="."/> </xsl:attribute> </xsl:template> <xsl:template match="item"> <item> <xsl:apply-templates/> </item> </xsl:template> <xsl:template match="item/title"> <title> <xsl:value-of select="."/> </title> </xsl:template> <xsl:template match="*"> <xsl:apply-templates/> </xsl:template> <xsl:template match="text()"/> </xsl:stylesheet>
|

Cart



