#25506 [Opn->WFx]: <xsl:include> with relative path
| From: | rrichards@php.net | Date: | Fri, 19 Sep 2003 12:51:30 +0000 |
| Subject: | #25506 [Opn->WFx]: <xsl:include> with relative path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47831@lists.php.net to get a copy of this message | ||
ID: 25506
Updated by: rrichards@php.net
Reported By: cryo28 at rbcmail dot ru
-Status: Open
+Status: Wont fix
Bug Type: DOM XML related
Operating System: Win2K
PHP Version: 4.3.3
New Comment:
When loading documents and stylesheets from memory rather than from a
file, there is no base directory defined on the document. Either use
full paths for the includes or set a base href tag in the stylesheet.
This issue is being addressed in PHP 5 as doing so in the current
domxml will break BC.
Previous Comments:
------------------------------------------------------------------------
[2003-09-12 01:48:14] cryo28 at rbcmail dot ru
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 this bug report at http://bugs.php.net/?id=25506&edit=1