View Issue Details

IDProjectCategoryView StatusLast Update
0000113Xdebug(No Category)public2005-09-23 09:26
ReporterLupusMichaelisAssigned Toderick 
PrioritynormalSeveritycrashReproducibilityunable to reproduce
Status resolvedResolutionunable to reproduce 
Product Version 
Target VersionFixed in Version 
Summary0000113: XSLT PHP functions registered
DescriptionIf I use a registered PHP function in an XSLT file, xdebug crash PHP5.
Additional Informationhttp://de.php.net/manual/fr/function.xsl-xsltprocessor-register-php-functions.php
TagsNo tags attached.
Operating SystemGNU/Linux Debian Sarge
PHP Version5.0.2

Activities

derick

2005-02-16 11:48

administrator   ~0000228

Can you please provide a reproducing script, and are you really using version 1.3.2?

LupusMichaelis

2005-02-16 16:39

reporter   ~0000232

Last edited: 2005-02-16 16:43

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

Completly foo !


</xsl:template>
<xsl:template match="bar">
  

I got a bar !


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

administrator   ~0000247

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 09:26

administrator   ~0000295

No feedback given.

Issue History

Date Modified Username Field Change
2005-02-05 11:24 LupusMichaelis New Issue
2005-02-16 11:48 derick Note Added: 0000228
2005-02-16 11:48 derick Status new => feedback
2005-02-16 16:39 LupusMichaelis Note Added: 0000232
2005-02-16 16:43 LupusMichaelis Note Edited: 0000232
2005-03-10 22:40 derick Note Added: 0000247
2005-03-10 22:40 derick Reproducibility always => unable to reproduce
2005-09-23 09:26 derick Status feedback => resolved
2005-09-23 09:26 derick Resolution open => unable to reproduce
2005-09-23 09:26 derick Assigned To => derick
2005-09-23 09:26 derick Note Added: 0000295
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)