troubleshooting Question

Passing XSL Parameter in ASP

Avatar of kermitastic
kermitastic asked on
Web Languages and StandardsASPXML
20 Comments2 Solutions1327 ViewsLast Modified:
Hi Experts

Please help I've been looking for a possible solution to no avail -- getting a very frustrating error with the code below

msxml3.dll error '80070057'

The parameter is incorrect.

/test.asp, line 220



                Dim selectedItem
                selectedItem = Request.querystring("selectedCategory")
                                             
                dim xmlRoot, objXml, strExtXMLfile
                           
                set xmlRoot = Server.CreateObject("Microsoft.XMLDOM")
                set objXml = Server.CreateObject("Microsoft.XMLHTTP")
   
                strExtXMLfile = "http://www.abc.com/feed.xml"
                objXml.Open "GET", strExtXMLfile, false
                objXml.Send

                'Load XSL
                set xsl = Server.CreateObject("Microsoft.XMLDOM")
               
                xsl.async = false
                xsl.load(Server.MapPath("playlist-by-date.xsl"))
               
                if xmlRoot.loadXML(objXml.ResponseText) then
                Set rssXml = xmlRoot.documentElement
                else
                Response.Write xmlRoot.parseError.reason & ", "  & xmlRoot.parseError.errorCode
                end If

                Response.Write(xmlRoot.transformNode(xsl))


                'LOAD ITEMS BASED ON PASSED PARAMETER
                SET objXSL = server.CreateObject ("MSXML2.FREETHREADEDDOMDOCUMENT")              
                SET objTemplate = server.CreateObject("MSXML2.XSLTEMPLATE")
                     
                objXSL.async=false
               'Load XSL

                objXSL.Loadxml  strExtXMLfile                                        
                objXSL.Load(Server.MapPath("showItemsByDate.xsl"))

                set objTemplate.stylesheet = objXSL
                set objProcessor = objTemplate.createProcessor

                objProcessor.addParameter "selectedCategory", selectedItem

                objProcessor.input = objXML          <<--- ERROR HERE
                objProcessor.Transform()
                 
                strTransformedValue = objProcessor.output
                Response.Write(strTransformedValue)
                               
                'Clean Up
                 set objXML=nothing
                 set objXSL=nothing
                 set objProcessor=nothing
                 set objTemplate=nothing

MSXML2 is installed on the server, anything else that i need to get into account?

Im not sure what else is causing it :o(



Thx
ASKER CERTIFIED SOLUTION
Gertone (Geert Bormans)
Information Architect
Join our community to see this answer!
Unlock 2 Answers and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros