[xsl] ASP and MSXML AddParameter

Subject: [xsl] ASP and MSXML AddParameter
From: "Jay Zeiger" <jzeiger@xxxxxxxxxxxx>
Date: Mon, 7 Jul 2003 17:18:34 -0400
I have coded ASP (thanks to internet.com) so that I can display XML/XSL
files, but I need to add the "AddParameter" method. I have read some older
posts here, but I can't quite figure out how to do this. If I wanted to add
a parameter named "param1", I think I need something like:


if len(strOptionalParam1) then
	Set xslProc = xslt.createProcessor()
	xslProc.input = xmlDoc    ' >>>>>>---- what is this xmlDoc suppose to refer
to??????
	xslProc.addParameter "param1", strOptionalParam1
	xslProc.Transform
end if



'
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++
' + But, how is this properly integrated into my function (assume that
strOptionalParam1
' + contains the param1 value) ????????????????????
'
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++

Function loadXMLFile(strXMLFile, strXSLFile, strOptionalParam1)

	'Declare local variables
 	Dim objXML
 	Dim objXSL
	Dim xslProc

 	'Instantiate the XMLDOM Object that will hold the XML file.
 	set objXML = Server.CreateObject("Microsoft.XMLDOM")

 	'Turn off asyncronous file loading.
 	objXML.async = false

 	'Load the XML file.
 	objXML.load(strXMLFile)

 	if len(strXSLFile) then

 		'Instantiate the XMLDOM Object that will hold the XSL file.
		 set objXSL = Server.CreateObject("Microsoft.XMLDOM")

		 'Turn off asyncronous file loading.
		 objXSL.async = false

		 'Load the XSL file.
		 objXSL.load(strXSLFile)

		 Response.Write(objXML.transformNode(objXSL))

 	else

		 Response.Write (objXML.transformNode(objXML))

 	end if


	if Err.Number then
		ErrorReportingRoutine()
	end if
End Function


'
' THANKS very much!!
'




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread