XML_XSLT_Backend_XSLT_ext

From: Date: Fri, 01 Nov 2002 15:41:51 +0000
Subject: XML_XSLT_Backend_XSLT_ext
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-10424@lists.php.net to get a copy of this message
Hello! There is a problem on windows with setXSL and the way xslt_process needs it's parameters on windows. (Running 4.2.2 on win2k) When doing: $xslt->setXSL('file://d:/my.xsl'); I get 'Failed to load file://d:/my.xsl . When doing : $xslt->setXSL('d:/my.xsl'); $xslt->process(); $xslt->ResultDumpOut(); I get 'Invalid argument or parameter array to xslt_process'. Because, when specifying a local (?) file to xslt_process you need to specify file:// in front of the file name. The problem is AFAIK only when using XSLT_ext. I found a workaround, which solves my problem. In XSLT_ext.php ResultDumpOut() i add the following lines before doing the xslt_process() $this->arg_xsl = (is_file($this->arg_xsl) && !strstr($this->arg_xsl, 'file://')) ? 'file://'.$this->arg_xsl : $this->arg_xsl; $this->arg_xml = (is_file($this->arg_xml) && !strstr($this->arg_xml, 'file://')) ? 'file://'.$this->arg_xml : $this->arg_xml; I dunno if this is the best way or not, but as I said - it solved my problem. Regards, Nils-Fredrik

« previous php.pear.dev (#10424) next »