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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: aforeest at corp dot home dot nl
New email:
PHP Version: OS:

 

 [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-2021 The PHP Group
All rights reserved.
Last updated: Tue May 18 02:01:23 2021 UTC