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
--
Bret Mogilefsky * Mgr SCEA Developer Support * [EMAIL PROTECTED]

Attachment: sample2.php
Description: application/php

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>


<xsl:output method="html"/>

<xsl:template match="article">
<html>
<head>
<title><xsl:value-of select="title"/></title>
</head>
<body>
<h1><xsl:value-of select="title"/></h1>
<xsl:apply-templates select="section"/>
</body>
</html>
</xsl:template>

<xsl:template match="section">
<xsl:apply-templates/>
<hr/>
</xsl:template>

<xsl:template match="section/title">
<h2><xsl:apply-templates/></h2>
</xsl:template>

<xsl:template match="para">
<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="itemizedlist">
<ul><xsl:apply-templates/></ul>
</xsl:template>

<xsl:template match="listitem">
<li><xsl:apply-templates/></li>
</xsl:template>
</xsl:stylesheet>

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

Reply via email to