The following bug has been RESOLVED.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000113
======================================================================
Reporter: LupusMichaelis
Handler: derick
======================================================================
Project: Xdebug
Bug ID: 113
Category: Debug client (console)
Reproducibility: unable to duplicate
Severity: crash
Priority: normal
Status: resolved
Operating System: GNU/Linux Debian Sarge
PHP Version: 5.0.2
Xdebug Version: 1.3.2
Resolution: unable to duplicate
======================================================================
Date Submitted: 2005-02-05 11:24 CET
Last Modified: 2005-09-23 10:26 CEST
======================================================================
Summary: XSLT PHP functions registered
Description:
If I use a registered PHP function in an XSLT file, xdebug crash PHP5.
======================================================================
----------------------------------------------------------------------
derick - 2005-02-16 11:48 CET
----------------------------------------------------------------------
Can you please provide a reproducing script, and are you really using
version 1.3.2?
----------------------------------------------------------------------
LupusMichaelis - 2005-02-16 16:43 CET
----------------------------------------------------------------------
The version I give is the php_info version for x-debug !
Here an exemple :
<?php
$xml = <<<EOS
<foo>
<bar>Blah !</bar>
</foo>
EOS;
$xsl = <<<EOS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<xsl:stylesheet
version="1.0"
xmlns:php="http://php.net/xsl"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
encoding="utf-8"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
indent="yes"
/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head><title>Toto don't love me !'</title></head>
<body>
<xsl:apply-templates/>
<xsl:value-of select="php:function('php_func', node())"
disable-output-escaping="yes" />
</body>
</html>
</xsl:template>
<xsl:template match="foo">
<p>Completly foo !</p>
</xsl:template>
<xsl:template match="bar">
<p>I got a bar !</p>
</xsl:template>
</xsl:stylesheet >
EOS;
function php_func($node)
{
if(get_class($node[0]) == 'DOMNode')
return 'I\'ve got a Node !' ;
else
return 'I\'ve got something strange...' ;
}
$model = DOMDocument::loadXML($xml) ;
$xslt = DOMDocument::loadXML($xsl) ;
$proc = new XSLTProcessor() ;
$proc->importStyleSheet($xslt) ;
$proc->registerPhpFunctions();
$out = $proc->transformToDoc($model) ;
echo $out->saveXML()
?>
edited on: 2005-02-16 16:43
----------------------------------------------------------------------
derick - 2005-03-10 22:40 CET
----------------------------------------------------------------------
I can not reproduce this with the latest CVS version (both 1.3.3-rev or
2.0.0-dev). Please try one of those versions and provide feedback.
----------------------------------------------------------------------
derick - 2005-09-23 10:26 CEST
----------------------------------------------------------------------
No feedback given.
Bug History
Date Modified Username Field Change
======================================================================
2005-02-05 11:24LupusMichaelis New Bug
2005-02-05 11:24LupusMichaelis Bug Monitored: LupusMichaelis
2005-02-16 11:48derick Bugnote Added: 0000228
2005-02-16 11:48derick Status new => feedback
2005-02-16 16:39LupusMichaelis Bugnote Added: 0000232
2005-02-16 16:43LupusMichaelis Bugnote Edited: 0000232
2005-03-10 22:40derick Bugnote Added: 0000247
2005-03-10 22:40derick Reproducibility always => unable to duplicate
2005-09-23 10:26derick Bugnote Added: 0000295
2005-09-23 10:26derick Assigned To => derick
2005-09-23 10:26derick Resolution open => unable to duplicate
2005-09-23 10:26derick Status feedback => resolved
======================================================================
Received on Fri Sep 23 2005 - 10:26:34 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST