|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46729 xslt_base_dir parameter doesn't work
Submitted: 2008-12-02 09:29 UTC Modified: 2008-12-16 14:38 UTC
From: gpl at ircf dot fr Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 5.2.6 OS: Linux Ubuntu 8.10
Private report: No CVE-ID: None
 [2008-12-02 09:29 UTC] gpl at ircf dot fr
Base path cannot be changed by setting the parameter xslt_base_dir in the xslt processor. This bug was also reported here :

Reproduce code:
// First, load a XSL stylesheet
$xslDom = DomDocument::loadXML('<xsl:stylesheet version="1.0" xmlns:xsl=""><xsl:include href="foo"/></xsl:stylesheet>');

// Then initialize the XSLTProcessor
$xsltProcessor = new xsltprocessor();

// Set the xslt_base_dir

// Import the stylesheet in the processor

Expected result:
This program should raise the following warning : Failed to load external entity ".../base/foo"

Actual result:
The program raises the warning : Failed to load external entity ".../foo"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-16 14:38 UTC]
That syntax is from the old sablotron extension.
You can set the base directory from a document loaded via memory using:
$xslDom->documentURI = dirname(__FILE__) . '/base/';

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 17 03:01:23 2021 UTC