ID: 13779
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: XSLT related
Operating System: Debian
PHP Version: 4.1.0RC1
New Comment:

Ignore. Messed the order of xsl and xml parameters.

Previous Comments:
------------------------------------------------------------------------

[2001-10-21 10:02:12] [EMAIL PROTECTED]

Consider following script (xslt extension loaded):

<?php
  $xslt = xslt_create();

  $args = array(
    "/_xsl" => '<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
                 <xsl:template match="test">
                  <xsl:value-of select="."/>
                 </xsl:template>
                </xsl:stylesheet>',
    "/_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";
  xslt_free($xslt);
?>

And when you run it you get:

EXPECTED RESULT:
<?xml version="1.0" encoding="UTF-8"?>TestValue
REAL RESULT:
<?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="http://www.w3.org/1999/XSL/Transform";><xsl:template 
match="test"><xsl:value-of select="."/></xsl:template></xsl:stylesheet>' \
'/_xml=<test>TestValue</test>'


------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13779&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to