I am getting this error when transforming an xml document using an xsl. I have tested that the xsl works in xmlSPY and everything works fine. Both my original xml and the output xml have top level elements (can these have attributes?).
My asp code is:
Set xmlDoc=Server.CreateObject("MSXML2.DOMDocument")
xmlDoc.async=false
xmlDoc.load(Server.MapPath("/npt/xml/data_allcrime.xml"))
set xslDoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument")
xslDoc.async = false
xslDoc.load(Server.MapPath("/npt/xml/data_allcrime.xsl"))
set xslTemplate = Server.CreateObject("Msxml2.XSLTemplate")
' Setting the actual XSL document in the template
xslTemplate.stylesheet = xslDoc
' Compile your stylesheet into a processor
set xslProc = xslTemplate.createProcessor()
xslProc.addParameter "div", "E"
xslProc.input = xmlDoc ' The xml input here is actually the xml you want to transform
xslProc.transform() ' Do the transformation