|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13779 Tranformations do not work
Submitted: 2001-10-21 10:02 UTC Modified: 2001-10-24 16:51 UTC
From: lenar at city dot ee Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 4.1.0RC1 OS: Debian
Private report: No CVE-ID: None
 [2001-10-21 10:02 UTC] lenar at city dot ee
Consider following script (xslt extension loaded):

  $xslt = xslt_create();

  $args = array(
    "/_xsl" => '<xsl:stylesheet version="1.0" xmlns:xsl="">
                 <xsl:template match="test">
                  <xsl:value-of select="."/>
    "/_xml" => '<test>TestValue</test>'

  $data = xslt_process($xslt, "arg:/_xsl", "arg:/_xml", NULL, $args);

  echo "EXPECTED RESULT:\nTestValue\n";
  echo "REAL RESULT:\n" . $data . "\n";

And when you run it you get:

<?xml version="1.0" encoding="UTF-8"?>TestValue
<?xml version="1.0" encoding="UTF-8"?><test>TestValue</test>

same with sabcmd works correctly:

sabcmd 'arg:/_xsl' 'arg:/_xml' result.dat \
'/_xsl=<xsl:stylesheet version="1.0" xmlns:xsl=""><xsl:template match="test"><xsl:value-of select="."/></xsl:template></xsl:stylesheet>' \


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-24 08:27 UTC] lenar at city dot ee
Ignore. Messed the order of xsl and xml parameters.
 [2001-10-24 16:51 UTC]
user error -> bogus

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jul 29 20:01:24 2021 UTC