|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-13 10:10 UTC] teddy4you21 at hotmail dot com
[2003-08-13 11:02 UTC] msopacua@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
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..