Can anyone help with this error? I am getting it on an ASP page with an rss feed, error line 16, here is the code in question:
<%
Sub getXML(sourceFile)
dim styleFile
dim source, style
styleFile = Server.MapPath("news/newsbox_short.xsl")
set source = Server.CreateObject("Msxml2.DomDocument")
source.async = false
source.setProperty "ServerHTTPRequest", true
source.load CStr(sourceFile)
set style = Server.CreateObject("Msxml2.DomDocument")
style.async = false
style.load styleFile
source.transformNodeToObject style, Response ' THIS IS LINE 16
set source = nothing
set style = nothing
End Sub
%>
This error suddenly appeared a couple of days ago on a GoDaddy hosted account. The feed is called with this code:
<% getXML("http://p.feeddirect.com/page?query=skincare&o=rss002&wiz=2366933") %>
Here is the style sheet code:
<?xml version="1.0" ?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:map="http://www.ChristinaPupo.org/maps"
exclude-result-prefixes="map">
<xsl:output method="xml" encoding="iso-8859-1" omit-xml-declaration="yes" indent="yes"/>
<xsl:variable name="vMonthNames" select="'|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec'"/>
<xsl:template match="*">
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" class="newsBox">
<xsl:for-each select="//*[local-name()='item']">
<!-- year part -->
<xsl:sort order="descending"
select="substring(substring-after(substring-after(pubDate, ', '), ' '),5,4)"
data-type="number"/>
<!-- month part -->
<xsl:sort order="descending"
select="string-length(substring-before($vMonthNames,substring(substring-after(substring-after(pubDate, ', '), ' '),1,3)))"
data-type="number"/>
<!-- day part -->
<xsl:sort order="descending"
select="substring-before(substring-after(pubDate, ', '), ' ')"
data-type="number"/>
<xsl:variable name="pubdate" select="*[local-name()='pubDate']"/>
<xsl:variable name="weekday" select="substring-before($pubdate, ', ')"/>
<xsl:variable name="weekdayRemainder" select="substring-after($pubdate, ', ')"/>
<xsl:variable name="day" select="substring-before($weekdayRemainder, ' ')"/>
<xsl:variable name="dayRemainder" select="substring-after($weekdayRemainder, ' ')"/>
<xsl:variable name="month" select="substring($dayRemainder,1,3)"/>
<xsl:variable name="year" select="substring($dayRemainder, 5,4)"/>
<!-- number of articles to display -->
<xsl:if test="position() < 4">
<!-- title -->
<tr><td valign="top">
<span class="newsTitle">
<xsl:value-of select="document('')/xsl:stylesheet/map:month[@id=$month]"/>
<xsl:text> </xsl:text><xsl:value-of select="$day"/>
<xsl:text>, </xsl:text><xsl:value-of select="$year"/></span><br/>
<span class="news">
<a>
<xsl:attribute name="href">
<xsl:value-of select="*[local-name()='link']"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:text>top</xsl:text>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>news</xsl:text>
</xsl:attribute>
<xsl:value-of select="*[local-name()='title']" disable-output-escaping="yes"/>
</a>
</span></td></tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<map:month id="Jan">January</map:month>
<map:month id="Feb">February</map:month>
<map:month id="Mar">March</map:month>
<map:month id="Apr">April</map:month>
<map:month id="May">May</map:month>
<map:month id="Jun">June</map:month>
<map:month id="Jul">July</map:month>
<map:month id="Aug">August</map:month>
<map:month id="Sep">September</map:month>
<map:month id="Oct">October</map:month>
<map:month id="Nov">November</map:month>
<map:month id="Dec">December</map:month>
</xsl:stylesheet>
Any help is appreciated.
by: zc2Posted on 2008-12-08 at 21:42:49ID: 23127102
Check is the update 955069 installed?
ommunities /newsgroup s/en-us/ de fault.aspx ?dg=micros oft.public .xml&tid=c 894bdb9-e0 5b-40ce- bd 20-74427a2 d1fc6&cat= &lang=&cr= &sloc=&p=1
MSXML 3.0 SP10 (msxml3.dll 8.100.1043.0) and MSXML 6.0 SP2 (msxml6.dll 6.20.1076.0)
now call the Commit method on the IStream interface passed to
the transformNodeToObject method. Previous versions did not do this. The
Response object of ASP does not implement this method and throws an error
when asked to do so.
The work round is to create a Wrapping Implementation of IStream and absorb
the Commit call.
read more here:
http://www.microsoft.com/c
or, you can just write
Select allOpen in new window