note 17916 deleted from function.xslt-process by didou

From: Date: Wed, 19 May 2004 20:30:19 +0000
Subject: note 17916 deleted from function.xslt-process by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69847@lists.php.net to get a copy of this message
Note Submitter: ascii@microcore.dk ---- I had quite a bit of a struggle working out how to pass variables / params to the xsl stylesheet using the last optional argument of the xslt_process function. For some odd reason it seems that xslt_process doesn't accept a NULL in place of the optional args argument. I found that the following solution worked out fine. ----- $xml_data = load_file('some.xml'); $xh = xslt_create(); $args = array ( '/_xml' => $xml_data ); $params = array ( 'somevariable' => 'somecontent' ); $result = xslt_process($xh, 'arg:/_xml', 'index.xsl', NULL, $args, $params); ----- HTH for anyone with similar problems.

« previous php.notes (#69847) next »