RE: asp error on stylesheet
You need to use the absolute path to the files you are loading. Instead of doing: xsl.load ("second_stylesheet.xsl") try: xsl.load (Server.MapPath("second_stylesheet.xsl")) The same is true of the other document you are loading. > -----Original Message----- > From: Ivana Kunac [mailto:ikunac@h...] > Sent: Friday, March 08, 2002 3:42 PM > To: xml-dev@l... > Subject: asp error on stylesheet > > > Hi, > > I have an xml file that is to be transformed by two stylesheets. > The first stylesheet generates the links and the second > stylesheet takes a > parameter which is the ID of one of the linking elements and displays > details of that element only. > > I used the following code to do the transformation. > <% Response.Buffer=True %> > <% Dim xml > Dim xsl > Dim template > Dim processor > > Set xml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0") > xml.async = false > xml.load ("my_file.xml") > > Set xsl = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0") > xsl.async = false > xsl.load ("second_stylesheet.xsl") > > > Set template = Server.CreateObject("MSXML2.XSLTemplate.3.0") > template.stylesheet = xsl > set processor = template.createProcessor() > processor.input = xml > > id = Request.querystring("id") > processor.addParameter "param1", id > processor.transform() > Response.write (processor.output) > %> > > However, it was not successful, the error I received was the > following: > HTTP 500.100 - Internal Server Error - ASP error > Internet Information Services > > Error Type: > msxml3.dll (0x80004005) > The stylesheet does not contain a document element. The > stylesheet may be > empty, or it may not be a well-formed XML document. > ' /LINE template.stylesheet=xsl > > > I did the same transformation client-side and it worked > (however, I have to > use asp). So I know the stylesheet is absolutely fine. > I have IE 6.0 and I use IIS v5.1 on WinXP Pro to test my asp pages. > > I apologize if this is a newbie question, I'm still learning. > Has anyone come across such a problem? Any suggestions would > be of great > help for me. > Thanks, > > Ivana > > _________________________________________________________________ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://lists.xml.org/ob/adm.pl> >
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format