Subject: RE: [xsl] <xsl:call-template> error From: Jen Jiang <zhenjiang14221@xxxxxxxxx> Date: Fri, 5 Nov 2004 18:28:03 -0800 (PST) |
I am sure they are in the save directory. I didn't know RSS feed could be unavailable. I found that if I run it on my local computer (Win XP)it worked but when I upload the files onto a remote server which is a Unix server it gives the error "Access denied" this time. But I have changed the file permission to allow read and execute. I'm so confused. Why does it have different behavoirs when on different OS? Thanks. --- Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx> wrote: > Hi again Jen, > > I saved your XML as rss.xml, and your XSL as > getRSS.xsl. > Then I loaded rss.xml in IE6 (using drag and drop > from Windows Explorer to > an IE window), and it seems to work fine as a series > of links appear. > > Are you sure your xml and xsl are in the same > directory? > Or the RSS feed wasn't available at the time you > tried it? > > Cheers, > <prs/> > > -----Original Message----- > From: Jen Jiang [mailto:zhenjiang14221@xxxxxxxxx] > Sent: Friday, November 05, 2004 12:22 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: [xsl] <xsl:call-template> error > > It's IE6. > > > Hi Jen, > > Which browser do you use? > > Cheers, > <prs/> > > -----Original Message----- > From: Jen Jiang [mailto:zhenjiang14221@xxxxxxxxx] > Sent: Thursday, November 04, 2004 10:22 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] <xsl:call-template> error > > I have an xml which is a RSS feed link: > > <?xml-stylesheet href="getRSS.xsl" type="text/xsl"?> > <RSSChannels> > > <!-- RSS 0.91 feeds --> > <RSSChannel > src="http://www.tinnitus-research.org/atr.xml"/> > <!-- RSS 1.0 feeds --> > <!-- RSS 2.0 feeds --> > <RSSChannel > src="http://www.medicinenet.com/rss/specialty/Tinnitus.xml"/> > > </RSSChannels> > > I use an xslt file to transfer RSS to HTML: > <?xml version="1.0"?> > <!-- getRSS.xsl: retrieve RSS feed(s) and convert to > HTML. --> > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:dc="http://purl.org/dc/elements/1.1/" > version="1.0"> > <xsl:output method="html" encoding="iso-8859-1"/> > <xsl:template match="RSSChannels"> > <html> > <head> > <title>Today's Headlines</title> > </head> > <body> > <xsl:apply-templates/> > </body> > </html> > </xsl:template> > <xsl:template match="RSSChannel"> > <xsl:apply-templates select="document(@src)"/> > </xsl:template> > <!-- Named template outputs HTML a element with > href link and RSS > description as title to show up in mouseOver > message. --> > <xsl:template name="a-element"> > <xsl:element name="a"> > <xsl:attribute name="href"><xsl:apply-templates > select="*[local-name()='link']"/></xsl:attribute> > <xsl:attribute name="title"><xsl:apply-templates > select="*[local-name()='description']"/></xsl:attribute> > <xsl:value-of select="*[local-name()='title']"/> > </xsl:element> > </xsl:template> > <!-- Output RSS channel name as HTML a link inside > of > h1 element. --> > <xsl:template match="*[local-name()='channel']"> > <xsl:call-template name="a-element"/> > <!-- Following line for RSS .091 --> > <xsl:apply-templates > select="*[local-name()='item']"/> > </xsl:template> > <!-- Output RSS item as HTML a link inside of p > element. --> > <xsl:template match="*[local-name()='item']"> > <xsl:call-template name="a-element"/> > <xsl:text> </xsl:text> > <xsl:if test="dc:date"> > <!-- Show date if available --> > <xsl:text>( </xsl:text> > <xsl:value-of select="dc:date"/> > <xsl:text>) </xsl:text> > </xsl:if> > </xsl:template> > </xsl:stylesheet> > > But when I ran it in browser it gave me error: > > "The XML page cannot be displayed > Cannot view XML input using XSL style sheet. Please > correct the error and > then click the Refresh button, or try again later. > > > ---------------------------------------------------------------------------- > ---- > > Keyword xsl:stylesheet may not contain > xsl:call-template." > > I don't know why this happened. I have used > <xsl:call-template> in <xsl:stylesheet> so many > times > (not these files) without getting the error. > > Thank you very much for any input. > > > > > > > > > > > __________________________________ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] <xsl:call-template> error, Pieter Reint Siegers | Thread | RE: [xsl] <xsl:call-template> error, Pieter Reint Siegers |
RE: [xsl] <xsl:call-template> error, Pieter Reint Siegers | Date | [xsl] Help needed to make XSL for m, Lim Siew Yin |
Month |