views:

26

answers:

3

Hello, Could you help me to answer how to put collection of data as parameter in the xslt file, is it possible ? Thanks.

A: 

This:

<xsl:param name="chunks" select="collection('file:///C:/test_xml?*.xml')"/>

loads all of the .xml files in the C:\text_xml directory into the parameter chunks.

Is this what you were looking for?

*Note: This was done using Saxon-PE 9.2

DevNull
something like this but without extension(or .net extension)
jitm
A: 

Maybe you want document() ?

http://www.w3schools.com/Xsl/func_document.asp

Joaozinho das Couves
A: 

In .Net you need to pass a XsltArgumentList object to the Transform method as described here:

http://msdn.microsoft.com/en-us/library/dfktf882.aspx

Alejandro
I know about XsltArgumentList and also, it is extension of .net platform, I'll try example with collection()
jitm
@jitm: Well, but you have accepted an answer for XSLT 2.0 processor (as `collection` is a core function from XPath 2.0), something VS is not.
Alejandro
Yes, I know about collection.
jitm