ID: 25076
Updated by: [email]msopacuaphp.net[/email]
Reported By: teddy4you21 at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: XSLT related
Operating System: WindowsXP
PHP Version: 4.3.2
New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the doentation available at
[url]http://www.php.net/manual/[/url] and the instructions on how to report
a bug at [url]http://bugs.php.net/how-to-report.php[/url]

[url]http://www.php.net/manual/en/language.oop.magic-functions.php[/url]


Previous Comments:
------------------------------------------------------------------------

[2003-08-13 10:10:43] teddy4you21 at hotmail dot com

Note: if I recreate the mxml object on every page, I also get the
results. But I want to reuse the same object each time..

------------------------------------------------------------------------

[2003-08-13 10:06:03] teddy4you21 at hotmail dot com

Description:
------------
Hi,

in first instance the code works perfect, I get the results with xslt
layout.
But when I place the class mxml in a session, nothing is returned.
Besides, the xlst processor does not return any error.

The code is included on top of every webpage.
when calling processXMLData($vXML, $vXSL), $vXML is real xml data,
while $vXSL is just an url to the XSL doent.

with kind regards
Kris

Reproduce code:
---------------
class mxml {
var $xh;

function mxml() {
$this->xh = xslt_create();
}

function processXMLData($vXML, $vXSL) {
$arguments = array('/_xml' => $vXML);
$result = xslt_process($this->xh, 'arg:/_xml', $vXSL, NULL,
$arguments);

if ($result)
return $result;
else
return "<h2>no results were returned</h2>";
}

function stopXML() {
xslt_free($this->xh);
}
}

// called on every page
function startsession() {
global $mxml;

ob_end_clean();
ob_start();
session_start();

if(session_is_registered("mxml"))
$mxml = &$_SESSION["mxml"];
else {
$mxml = new mxml();
session_register("mxml");
}
}

startsession()

Expected result:
----------------
a html table with the rows comming from a MySql database

Actual result:
--------------
no results are returned by the xslt processor, thus no html table..


------------------------------------------------------------------------


--
Edit this bug report at [url]http://bugs.php.net/?id=25076&edit=1[/url]