It seems that it loses path information, it will work if you use an 
absolute path like this:

function my_output_handler($string) {
         $arguments = array('/_xml' => $string,'/_xsl'=>$xsl);
         $xsltproc = xslt_create();
         $html = xslt_process($xsltproc, 'arg:/_xml', 
"/usr/local/apache/htdocs/mysheet.xsl", NULL, $arguments);
         if (!$html)
                 $html = 'XSLT processing error: '.xslt_error($xsltproc)."\n";
         return $html;

If this is a bug I am not qualified to say :) but it seems that it is not 
only the xslt that is affexted as I could not load the xsl file using fread 
either unless I gave the full path.

At 05:02 AM 6/06/2002, Bret Mogilefsky wrote:
>Hello php-gen'ers,
>I've been whacking my head against this for a day or so and I'm fairly
>certain I've discovered a bug in the way user-defined output buffering
>handlers work when not explicitly triggered by a call to ob_end_flush().
>See the attached sample2.php and mysheet.xsl, both of which should be
>located in the same directory.  Calling sample2.php by itself I get:
>         XSLT processing error: cannot open file '/mysheet.xsl'
>Calling sample2.php with "sample2.php?explicit_ob_flush=1" properly
>finds the .xsl file and does the transformation.
>My take: The handler is obviously being called whether I explicitly call
>ob_end_flush() or not once the end of the script is reached, which is
>what I expect and want.  However, the behavior is buggy when the call is
>not done explicitly.
>I'll file a bug if someone else can confirm that I should be getting the
>same behavior in both cases...  Otherwise please point out what I'm
>doing wrong.  I'm using php 4.2.1 with apache 1.3.23 under Red Hat 7.3,
>and had the same problem with 4.1.2.
>Please cc my address as I'm not subscribed to the list.
>Thanks in advance,
>Bret Mogilefsky * Mgr SCEA Developer Support * [EMAIL PROTECTED]
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to