#25076 [NEW]: xslt not returning results when called within class that is stored in a session

From: Date: Wed, 13 Aug 2003 15:06:03 +0000
Subject: #25076 [NEW]: xslt not returning results when called within class that is stored in a session
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45856@lists.php.net to get a copy of this message
From:             teddy4you21 at hotmail dot com
Operating system: WindowsXP
PHP version:      4.3.2
PHP Bug Type:     XSLT related
Bug description:  xslt not returning results when called within class that is stored in a session

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 bug report at http://bugs.php.net/?id=25076&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25076&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25076&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25076&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25076&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25076&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25076&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25076&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25076&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25076&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25076&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25076&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25076&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25076&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25076&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25076&r=gnused



Thread (3 messages)

« previous php.bugs (#45856) next »