[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Access denied

Subject: Access denied
From: Jen Jiang <zhenjiang14221@xxxxxxxxx>
Date: Sun, 7 Nov 2004 07:42:57 -0800 (PST)
access denied template
I have a xsl file and a xml file. The xml contains 2
RSS feed URLs. I use the xsl file to transform the RSS
feed into HTML which lists the items of the feed. But
I got an error message:

 "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. 
--------------------------------------------------------------------------------
Access is denied. Error processing resource
'file://Users/zjwsun/Sites/hrl/xsl/getRSS.xsl'. " 

I don't know what is wrong. Thanks for any help.

Here's the XML:
<?xml version="1.0"?>
<?xml-stylesheet
href="/Users/zjwsun/Sites/hrl/xsl/getRSS.xsl"
type="text/xsl"?>

<RSSChannels>
  <RSSChannel
src="http://www.tinnitus-research.org/atr.xml"/>
  <RSSChannel
src="http://www.medicinenet.com/rss/specialty/Tinnitus.xml"/>
</RSSChannels>

Here's the XSL:
<?xml version="1.0"?>
<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>



		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.