|  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
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.
Block user comment
Status: Assign to:
Bug Type:
From: gpl at ircf dot fr
New email:
PHP Version: OS:


 [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: Fri Mar 05 11:01:23 2021 UTC