ID:               25076
 User updated by:  teddy4you21 at hotmail dot com
 Reported By:      teddy4you21 at hotmail dot com
 Status:           Open
 Bug Type:         XSLT related
 Operating System: WindowsXP
 PHP Version:      4.3.2
 New Comment:

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..


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

[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 document.

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 http://bugs.php.net/?id=25076&edit=1

Reply via email to