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 doent 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:
----------------
[url]http://example.com/stylesheet.xsl[/url]

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

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