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

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

Reproduce code:

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


<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

Edit bug report at [url][/url]
Try a CVS snapshot (php4): [url][/url]
Try a CVS snapshot (php5): [url][/url]
Fixed in CVS: [url][/url]
Fixed in release: [url][/url]
Need backtrace: [url][/url]
Try newer version: [url][/url]
Not developer issue: [url][/url]
Expected behavior: [url][/url]
Not enough info: [url][/url]
Submitted twice: [url][/url]
register_globals: [url][/url]
PHP 3 support discontinued: [url][/url]
Daylight Savings: [url][/url]
IIS Stability: [url][/url]
Install GNU Sed: [url][/url]