Contents of transform.inc
<%
function transformDocument(srcXML, srcXSL)
dim sourceFile, styleFile, source
sourceFile = server.MapPath(srcXML)
styleFile = server.MapPath(srcXSL)
' Load XML
set source = server.CreateObject("Microsoft.XMLDOM")
source.async = false
source.load sourceFile
' Load XSL
set style = server.CreateObject("Microsoft.XMLDOM")
style.async = false
style.load styleFile
if (source.parseError.errorCode <> 0) then
result = reportParseError( source.parseError)
elseif (style.parseError.errorCode <> 0) then
result = reportParseError( style.parseError)
else
on error resume next
result = source.transformNode(style)
if (err.number<>0) then
result = reportRuntimeError(exception)
end if
end if
transformDocument = result
end function
%>