Skip to main content

Posts

Showing posts from October, 2008

Anoying XSLT Error

Had a nasty error in using an XSLT today. I was attempting to perform a transform but before I got that far, I kept getting an error, specifically when trying to set the stylesheet property of the xsl template object.
dimxslt,xmltemplsetxslt=Server.CreateObject("Msxml2.FreeThreadedDOMDocument")xslt.async=falsexslt.loadServer.MapPath("my.xsl")setxmltempl=Server.CreateObject("Msxml2.XSLTemplate")setxmltempl.stylesheet=xslt The error I kept getting was "The system cannot locate the object specified" and I kept getting it right at the last line. I would then use my debugger to browse the xslt object and see that all the xml for that stylesheet was loading just fine as expected. I was very confused and spent a considerable amount of time trying to fix it.
Thankfully a colleague had a suggestion and to make a potentially long story short, the issue was that the xslt I was trying to import was trying to include a file that didn't exist. Unfortun…