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