View Full Version : Passing arrays to an XSLT stylesheet.

05-24-2004, 08:54 PM
Hi. I can pass variables to a XSLT stylesheet:
$xh = xslt_create();
$files = array (
'/_xsl' => implode('', file('file.xsl')),
'/_xml' => implode('', file('file.xml'))
$params = array (
'FOO' => 'foo'
xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $files, $params);
xslt_free($xh);Simple enough. My question: can I pass an entire array to the stylesheet? I tried format like 'FOO' => array('foo', 'bar') but when I used <xsl:value-of /> on that all i got was 'Array'. Can I access the values somehow in the stylesheet? The standard [] square brackets gives 'object is not node set' Sablotron error.