RE: [xsl] Passing parameters from ASP to XSL within a for-next block

Subject: RE: [xsl] Passing parameters from ASP to XSL within a for-next block
From: "bryan" <bry@xxxxxxxxxx>
Date: Tue, 11 Feb 2003 17:56:17 +0100
Seems like an asp problem so not one to address here, but I did notice
that transformXML("x", "y", myArray(i) is missing a closing ) of course
you probably have that in your code so...

I'm also supposing that xmlpath and xslpath are dimensioned somewhere
outside the function cause I don't see them offhand. Other than that
it's been a while since I've hand to work with a vbscript array so I
can't help there.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Nadia
Sent: Tuesday, February 11, 2003 5:44 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Passing parameters from ASP to XSL within a for-next

I have a simple ASP function to transform a XML
document using parameters. It works pretty well, but
when I use it within a for-next block it works only
for the first iteration. It returns an empty string
for the others.

This is the function:

function transformXML(param1, param2, param3)
	dim xml, xsl
	dim proc, XSLTemplate

	'put the XML in an object
	Set xml =
	xml.async = False
	xml.load xmlPath

	'load the XSL into an object
	Set xsl =
	xsl.async = False
	xsl.load xslPath
	'add parameters to the xsl
	Set XSLTemplate =
	Set XSLTemplate.stylesheet = xsl

	Set proc = XSLTemplate.createProcessor

	'set the source of the data
	proc.input = xml
	proc.addParameter "param1", cstr(param1)
	proc.addParameter "param2", cstr(param2)
	proc.addParameter "param3", cstr(param3)
	transformXML = proc.output

	'clean up
	set xml = Nothing
	set xsl = Nothing
	set proc = Nothing
	set XSLTemplate = Nothing
end function

And how I'm calling it:

for i = lbound(myArray) to ubound(myArray)
	Response.write transformXML("x", "y", myArray(i)

Any ideas why it's not working?

Kind regards,

Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread