From:             aforeest at corp dot home dot nl
Operating system: Debian/Linux
PHP version:      4.3.3
PHP Bug Type:     XSLT related
Bug description:  bad parameter in callback to xslt scheme handler

Description:
------------
I am performing an XSLT transformation using a stylesheet that does an
xsl:import from an external URL. To handle the HTTP scheme I install a
get_all scheme handler with the intent to retrieve the document from
there.

With the upgrade to Sablotron 1.0 (previously 0.97, which works fine) the
handler gets called with an incorrect 'rest' parameter. It contains only
the path of the URL, not the domain name.

Reproduce code:
---------------
function get_all_handler($processor, $scheme, $rest) {
    print "$scheme:$rest\n";
}

$xsltProcessor = xslt_create();
xslt_set_scheme_handlers($xsltProcessor, array('get_all' =>
'get_all_handler'));

$args = array(
    '/_xml' => '<rootNode/>',
    '/_xsl' => '<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
 <xsl:import href="http://example.com/stylesheet.xsl"/>
</xsl:stylesheet>'
);

xslt_process($xsltProcessor, 'arg:/_xml', 'arg:/_xsl', NULL, $args);
xslt_free($xsltProcessor);

Expected result:
----------------
http://example.com/stylesheet.xsl

Actual result:
--------------
http:/stylesheet.xsl

-- 
Edit bug report at http://bugs.php.net/?id=25511&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25511&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25511&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25511&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25511&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25511&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25511&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25511&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25511&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25511&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25511&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25511&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25511&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25511&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25511&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25511&r=gnused

Reply via email to