1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' Do the transform with a cache handler for xml and xsl (singleThread)
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Public Function Transform(XMLPath, XSLPath, XSLCacheName, bCache)
Dim proc
Dim xsl
Dim xslTemplate
Dim Item
Dim oXMLMember
'We put the xsl in cache if necessary, otherwise we just grab a pointer
if bCache AND USE_CACHE then
if isEmpty(Application(XSLCacheName)) or lenb(oFO.Form("Refresh"))>0 then
if not isEmpty(Application(XSLCacheName)) then
debug "Empty the xsl cache " & XSLCacheName
set xslTemplate = Application(XSLCacheName)
set xslTemplate = nothing
end if
set xslTemplate = cacheXSLTemplate(XSLPath, XSLCacheName)
else
set xslTemplate = Application(XSLCacheName)
end if
else
set xsl = loadXML(XSLPath)
set xslTemplate = server.CreateObject(MSXML_PROGID3)
'**************************** la ligne ou se produit l'erreur *********************
set xslTemplate.stylesheet = xsl
'***********************************************************************************
end if |