Dim xslt As New Msxml2.XSLTemplate
Dim xslDoc As New Msxml2.FreeThreadedDOMDocument
Dim xmlDoc As New Msxml2.DOMDocument
Dim xslProc As IXSLProcessor
xslDoc.async = False
xslDoc.Load "sample.xsl"
Set xslt.stylesheet = xslDoc
xmlDoc.async = False
xmlDoc.Load "books.xml"
Set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
xslProc.addParameter "param1", "Hello"
xslProc.Transform
MsgBox xslProc.output
Sample.xsl
Hi, what about if I do not want to use VBScript to do the transform ?
ie I declare in the xml file which xsl stylesheet to use
<?xml-stylesheet type="text/xsl" href="template.xsl" ?>
How do I pass in parameters in this case ?
Well, you can't I don't suppose, since the addParameter() is a method belonging to the XML DOM, and an XSLProcessor object is required, but I see what you are getting at.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.