me'
12-23-2003, 09:57 PM
Some simple XSLT:<?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 xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>RSS Feed Parser</title>
</head>
<body>
<h1>RSS Feed Parser</h1>
<xsl:for-each match="rss/channel/item">
<h2><xsl:value-of select="title" /></h2>
<p><xsl:value-of select="description" /></p>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>Gives a cryptic 'Error loading stylesheet: Parsing an XSLT stylesheet failed.' message in Mozilla. No line reference, reason for the error, etc. Just that. It's probably something stupid, but I think my XSLT is all well-formed, and I don't see what's wrong.
Insight?
Oh, and another question, putting a doctype in the XSLT won't get past the parser, and comes up with a badly formed error. Is there a fix for this?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>RSS Feed Parser</title>
</head>
<body>
<h1>RSS Feed Parser</h1>
<xsl:for-each match="rss/channel/item">
<h2><xsl:value-of select="title" /></h2>
<p><xsl:value-of select="description" /></p>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>Gives a cryptic 'Error loading stylesheet: Parsing an XSLT stylesheet failed.' message in Mozilla. No line reference, reason for the error, etc. Just that. It's probably something stupid, but I think my XSLT is all well-formed, and I don't see what's wrong.
Insight?
Oh, and another question, putting a doctype in the XSLT won't get past the parser, and comes up with a badly formed error. Is there a fix for this?