tags:

views:

255

answers:

1

Anyone know a way to pass an argument to the XSLT when using an SSIS XML Task?

There seems to be no obvious way to do this, but there may be some clever workaround/hack?

EDIT: I'm currently looking into running an xpath update to insert param values...

EDIT: I got this working in the end by using a script task to insert the parameter value into the XSLT file. Hacky, I know, but it works. (And I have to work with VB.net, ugh!)

+1  A: 

A quick search indicates that sending XSLT params is not possible in SSIS.

But, it also indicates that you could work with a variable as the XSLT source: Using XML Task (XSLT) with variables on social.msdn.microsoft.com (scroll down to Wenyang Hu's answer).

However, this looks like it would be a real pain in the a** to use.

Another idea would be to create a small XML file with a fixed name first (as part of the whole process) and store your parameter/config values there.

In your XSLT you could then load the file through the document('fixedname.xml') function and pull out the values you've just put there.

Tomalak

related questions