From:             cryo28 at rbcmail dot ru
Operating system: Win2K
PHP version:      4.3.3
PHP Bug Type:     DOM XML related
Bug description:  <xsl:include> with relative path

Description:
------------
Wrong handling <xsl:include> and <xsl:import> elements with href attribute
with relative to main-stylesheet path in domxml_xslt_stylesheet->process.

Got Error Warning: domxml_xslt_stylesheet(): compilation error: element
include in D:\inet\wwwroot\index.php on line 44

Warning: domxml_xslt_stylesheet(): xsl:include : unable to load
index/header.xslt in D:\inet\wwwroot\index.php on line 44
error!



Reproduce code:
---------------
php:

$xml = some valid xml;
$xslt = domxml_xslt_stylesheet($stylesheetstring);
$result = $xslt->process($xml);

xslt:

<xsl:include href="main/header.xslt"/>
<xsl:call-template name="header"/><!-- in main header.xslt-->


Expected result:
----------------
When When <xsl:include href="/inet/wwwroot/stylesheets/main/header.xslt"/>
$xslt->process($xml) works fine. But if
<xsl:include href="main/header.xslt"/> or <xsl:include
href="stylesheets/main/header.xslt"/> got warning with no result FALSE.

Directory structure something like 
d:\inet\wwwroot\index.php
d:\inet\wwwroot\stylesheets\main.xslt
d:\inet\wwwroot\stylesheets\main\header.xslt





-- 
Edit bug report at http://bugs.php.net/?id=25506&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25506&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25506&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25506&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25506&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25506&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25506&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25506&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25506&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25506&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25506&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25506&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25506&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25506&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25506&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25506&r=gnused

Reply via email to