php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25511 bad parameter in callback to xslt scheme handler
Submitted: 2003-09-12 06:57 UTC Modified: 2003-09-23 05:11 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: aforeest at corp dot home dot nl Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 4.3.3 OS: Debian/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 - 40 = ?
Subscribe to this entry?

 
 [2003-09-12 06:57 UTC] aforeest at corp dot home dot nl
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-23 05:11 UTC] sniper@php.net
Apparently bug in Sablotron.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 04:01:28 2024 UTC