#46729 [Opn->Bgs]: xslt_base_dir parameter doesn't work
| From: | rrichards@php.net | Date: | Tue, 16 Dec 2008 14:38:54 +0000 |
| Subject: | #46729 [Opn->Bgs]: xslt_base_dir parameter doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-132028@lists.php.net to get a copy of this message | ||
ID: 46729
Updated by: rrichards@php.net
Reported By: gpl at ircf dot fr
-Status: Open
+Status: Bogus
Bug Type: XSLT related
Operating System: Linux Ubuntu 8.10
PHP Version: 5.2.6
New Comment:
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/';
Previous Comments:
------------------------------------------------------------------------
[2008-12-02 09:29:14] gpl at ircf dot fr
Description:
------------
Base path cannot be changed by setting the parameter xslt_base_dir in
the xslt processor. This bug was also reported here :
http://bugs.php.net/bug.php?id=43454&edit=3
Reproduce code:
---------------
<?php
// First, load a XSL stylesheet
$xslDom = DomDocument::loadXML('<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:include
href="foo"/></xsl:stylesheet>');
// Then initialize the XSLTProcessor
$xsltProcessor = new xsltprocessor();
// Set the xslt_base_dir
$xsltProcessor->setParameter('','xslt_base_dir','base');
// Import the stylesheet in the processor
$xsltProcessor->importStylesheet($xslDom);
?>
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"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46729&edit=1