#46729 [NEW]: xslt_base_dir parameter doesn't work

2008-12-02 Thread gpl at ircf dot fr
From: gpl at ircf dot fr
Operating system: Linux Ubuntu 8.10
PHP version:  5.2.6
PHP Bug Type: XSLT related
Bug description:  xslt_base_dir parameter doesn't work

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=43454edit=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 bug report at http://bugs.php.net/?id=46729edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46729r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46729r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46729r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46729r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46729r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46729r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=46729r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=46729r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=46729r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=46729r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=46729r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=46729r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=46729r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46729r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=46729r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=46729r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=46729r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=46729r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=46729r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=46729r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=46729r=mysqlcfg



#43454 [Com]: xsl:include / xslt_based_dir

2008-11-02 Thread gpl at ircf dot fr
 ID:   43454
 Comment by:   gpl at ircf dot fr
 Reported By:  emmanuel dot de-peretti at cinqas dot fr
 Status:   No Feedback
 Bug Type: XSLT related
 Operating System: windows
 PHP Version:  5.2
 New Comment:

I have the same bug. It seems setting the xslt_base_dir parameter
doesnt work : 

?php
// Script to test the xslt_base_dir parameter bug

// 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');

// Initialize the XSLTProcessor
$xsltProcessor = new xsltprocessor();

// Set the xslt_base_dir
$xsltProcessor-setParameter('sablotron','xslt_base_dir','base');


// Import the stylesheet in the processor
$xsltProcessor-importStylesheet($xslDom);

// This should raise the following warning : Failed to load external
entity .../base/foo
// Instead the warning is : Failed to load external entity .../foo
?


Previous Comments:


[2007-12-08 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2007-11-30 06:44:39] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2007-11-29 17:18:03] [EMAIL PROTECTED]

Not a php.net website problem, reclassified.



[2007-11-29 16:52:20] emmanuel dot de-peretti at cinqas dot fr

Description:

Hi,

Since 5.2.x, the commande
setParameter('sablotron','xslt_base_dir',$file) seems doesnt't work if
you have xsl:include href=relatif path file.

In version 5.1.x, this working good.

Do you have an idea about it ?

Excuse me for my english, but french people.

Emmanuel de Peretti

Reproduce code:
---
Just make one program using and an xsl that include an other.

and after 
$proc = new XsltProcessor();
$proc-setParameter('sablotron','xslt_base_dir',$chemin);   

a bug is report only since php 5.2x before, it's good   







-- 
Edit this bug report at http://bugs.php.net/?id=43454edit=1