having problems getting my xsl to work in an asp page:
xsl:
<?xml version="1.0" encoding="iso-8859-1"?><!-
- DWXMLSource="xml/summerpro
mo.xml" -->
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DT
D XHTML 1.0 Transitional//EN" doctype-system="
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<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>Untitled Document</title>
<link href="
http://usagent.dev.sarah/promotions/summer-promo/css/specific_styles.css" rel="stylesheet" type="text/css" />
<a name="top"> </a>
</head>
<div id="main-container">
<div id="promo">
<a href="
http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="blank">
<img src="/images/shared/promot
ions/summe
r-promo-20
07/summerp
romo-no-fl
ash.jpg" width="481" height="393" border="0" vspace="0" hspace="0" alt="Click here to get the latest Flash player" /> </a>
<div id="summer-free-nights">
<h2>summer free night offers</h2>
<xsl:for-each select="rss/channel/single
Offer">
<dl>
<dt><xsl:value-of select="title" disable-output-escaping="y
es"/></dt>
<dt class="hotel"><a href="
http://agents.hotelconnect.co.uk/specialoffers.asp?citycode={citycode}
#{offer/@h
otelcode}"
><xsl:valu
e-of select="offer/@hotel"/>
60;<xsl:va
lue-of select="offer/@star"/></a>
</dt>
<dd>
<span class="nights"><xsl:value-
of select="offer/@nights"/></
span><br/>
<span class="price">$<xsl:value-
of select="offer/@price"/></s
pan><br/>
<span class="valid"><xsl:value-o
f select="offer/@valid"/></s
pan></dd>
</dl>
</xsl:for-each>
<xsl:for-each select="rss/channel/item">
<dl>
<dt><xsl:value-of select="title" disable-output-escaping="y
es"/></dt>
<dt class="hotel"><a href="
http://agents.hotelconnect.co.uk/specialoffers.asp?citycode={citycode}
#{offer/@h
otelcode}"
><xsl:valu
e-of select="offer/@hotel"/>
60;<xsl:va
lue-of select="offer/@star"/></a>
</dt>
<dd>
<span class="nights"><xsl:value-
of select="offer/@nights"/></
span><br/>
<span class="price">$<xsl:value-
of select="offer/@price"/></s
pan><br/>
<span class="valid"><xsl:value-o
f select="offer/@valid"/></s
pan></dd>
</dl>
</xsl:for-each>
</div>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("summer-promo.sw
f", "summer-promo", "822", "700", "8", "");
so.addVariable("whichSite"
, "USAgent");
//so.addVariable("whichSit
e", "devUSAgent");
so.addVariable("strCurrenc
y", "$");
so.write("promo");//must be same as div id
// ]]>
</script>
<div id="test" style="clear:both;margin:1
0px 0 0 0;padding:10px 0;"></div><!-- needed to clear the above content and create space for the footer (especially in IE) -->
</html>
</xsl:template>
</xsl:stylesheet>
asp page:
<%
dim strFile, objXML, objXSL, objTemplate, objProcessor
strFile = Request.ServerVariables("U
RL")
strFile = Right(strFile,len(strFile)
-(inStrRev
(strFile,"
/")))
SET objXML = server.CreateObject ("MSXML2.FREETHREADEDDOMDO
CUMENT")
SET objXSL = server.CreateObject ("MSXML2.FREETHREADEDDOMDO
CUMENT")
SET objTemplate = server.CreateObject("MSXML
2.XSLTEMPL
ATE")
objXML.async=false
'Load XML
objXSL.async=false
'Load XSL
objXML.Load(Server.MapPath
("
http://usagent.dev.sarah/promotions/summer-promo/xml/summerpromo.xml"))
objXSL.Load(Server.MapPath
("
http://usagent.dev.sarah/promotions/summer-promo/summerpromo.xsl"))
set objTemplate.stylesheet = objXSL
set objProcessor = objTemplate.createProcesso
r
' this makes the brand param for use in xsl
objProcessor.addParameter "strfilename", strFile
objProcessor.input = objXML
objProcessor.Transform()
strTransformedValue = objProcessor.output
Response.Write(strTransfor
medValue)
'Clean Up
set objXML=nothing
set objXSL=nothing
set objProcessor=nothing
set objTemplate=nothing
%>
get this error:
Server.MapPath() error 'ASP 0173 : 80004005'
Invalid Path Character
/promotions/summer-promo/s
ummer-2007
.asp, line 37
An invalid character was specified in the Path parameter for the MapPath method.