note 44494 deleted from function.xslt-process by sobak

From: Date: Tue, 22 Nov 2016 03:35:21 +0000
Subject: note 44494 deleted from function.xslt-process by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-207373@lists.php.net to get a copy of this message
Note Submitter: ppekaar at hotmail dot com ---- In response to "twa at carlbro dot dk" above I have finally solved how to combine two XML sources and one XSL stylesheet. The above comment was nearly right, for the php <?php xh = xslt_create(); xslt_set_base($xh,"file://c:\inetpub\wwwroot\yourwebsite\"); $arguments = array('/_xml' => $xmlSingle, '/_xsl'=>$xsl, '/xml2'=>$xml_rates); $xslResult = xslt_process($xh, 'arg:/_xml', 'single_availability_filter.xsl', NULL, $arguments,$parameters); ?> Please note that I have put in a blank variable "/_xsl => $xsl", the actuall XSL file is listed directly in the xslt_process fucntion. Note that we have a third XML data source which is called xml2 and is set a value $xml_rates. In your XSL stylesheet you can now call this XML data via the following line <xsl:variable name="filter_rates" select="document('arg:/xml2')/RackRates"/> the missing link was putting in the the arg:/ Also please note that I am using xslt_set_base which set the base filepath for all your XSL documents. Hope this helps. Phelim

« previous php.notes (#207373) next »