[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.4

getting xml/xsl to work in asp?

Asked by sa_designer in Extensible Stylesheet Language Transformation (XSLT), Active Server Pages (ASP), Extensible Markup Language (XML)

Tags: dtd, error, stylesheet, xml, xsl

having problems getting my xsl to work in an asp page:

xsl:
<?xml version="1.0" encoding="iso-8859-1"?><!-- DWXMLSource="xml/summerpromo.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//DTD 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/promotions/summer-promo-2007/summerpromo-no-flash.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/singleOffer">
  <dl>
  <dt><xsl:value-of select="title" disable-output-escaping="yes"/></dt>
  <dt class="hotel"><a href="http://agents.hotelconnect.co.uk/specialoffers.asp?citycode={citycode}#{offer/@hotelcode}"><xsl:value-of select="offer/@hotel"/>&#160;<xsl:value-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"/></span><br/>
    <span class="valid"><xsl:value-of select="offer/@valid"/></span></dd>
</dl>
    </xsl:for-each>      
  <xsl:for-each select="rss/channel/item">
  <dl>
    <dt><xsl:value-of select="title" disable-output-escaping="yes"/></dt>
    <dt class="hotel"><a href="http://agents.hotelconnect.co.uk/specialoffers.asp?citycode={citycode}#{offer/@hotelcode}"><xsl:value-of select="offer/@hotel"/>&#160;<xsl:value-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"/></span><br/>
    <span class="valid"><xsl:value-of select="offer/@valid"/></span></dd>      
</dl>
</xsl:for-each>
</div>
</div>
</div>

<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("summer-promo.swf", "summer-promo", "822", "700", "8", "");       
so.addVariable("whichSite", "USAgent");  
//so.addVariable("whichSite", "devUSAgent");  
so.addVariable("strCurrency", "$");

so.write("promo");//must be same as div id
            
// ]]>
</script>


<div id="test" style="clear:both;margin:10px 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("URL")
strFile = Right(strFile,len(strFile)-(inStrRev(strFile,"/")))

SET objXML = server.CreateObject ("MSXML2.FREETHREADEDDOMDOCUMENT")
SET objXSL = server.CreateObject ("MSXML2.FREETHREADEDDOMDOCUMENT")              
SET objTemplate = server.CreateObject("MSXML2.XSLTEMPLATE")
     
 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.createProcessor

' this makes the brand param for use in xsl
 objProcessor.addParameter "strfilename", strFile
 
 objProcessor.input = objXML
 objProcessor.Transform()
 
 strTransformedValue = objProcessor.output
 Response.Write(strTransformedValue)
       
 '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/summer-2007.asp, line 37

An invalid character was specified in the Path parameter for the MapPath method.
 
Related Solutions
Keywords: getting xml/xsl to work in asp?
 
Loading Advertisement...
 
[+][-]07/09/07 08:20 AM, ID: 19445877Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 08:24 AM, ID: 19445914Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 08:25 AM, ID: 19445926Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/09/07 08:33 AM, ID: 19446011Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/09/07 08:35 AM, ID: 19446037Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 08:39 AM, ID: 19446079Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/09/07 08:41 AM, ID: 19446095Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 08:42 AM, ID: 19446106Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 08:54 AM, ID: 19446214Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/09/07 09:08 AM, ID: 19446338Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/09/07 09:08 AM, ID: 19446340Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 09:14 AM, ID: 19446400Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/09/07 09:31 AM, ID: 19446541Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 09:32 AM, ID: 19446550Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 09:34 AM, ID: 19446561Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 09:35 AM, ID: 19446568Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 09:38 AM, ID: 19446601Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 10:12 AM, ID: 19446878Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/09/07 11:38 AM, ID: 19447613Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/10/07 02:35 AM, ID: 19451776Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/10/07 02:37 AM, ID: 19451789Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/10/07 02:38 AM, ID: 19451795Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/10/07 02:56 AM, ID: 19451887Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Extensible Stylesheet Language Transformation (XSLT), Active Server Pages (ASP), Extensible Markup Language (XML)
Tags: dtd, error, stylesheet, xml, xsl
Sign Up Now!
Solution Provided By: bugs
Participating Experts: 2
Solution Grade: A
 
[+][-]07/10/07 03:06 AM, ID: 19451946Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/10/07 03:17 AM, ID: 19452009Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/10/07 03:19 AM, ID: 19452019Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81