#27565 [Fbk->WFx]: DomXml ignoring namespace
ID: 27565
Updated by: chregu@php.net
Reported By: andrew dot price at boxuk dot com
-Status: Feedback
+Status: Wont fix
Bug Type: DOM XML related
Operating System: Red Hat Enterprise Linux ES rel3
PHP Version: 4.3.4
New Comment:
use the xpath functions. they do support namespaces.
get_elements_by_tagname doesn't. This is fixed in PHP5,
btw.
Previous Comments:
------------------------------------------------------------------------
[2004-03-11 09:19:07] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2004-03-11 06:35:26] andrew dot price at boxuk dot com
Description:
------------
PHP is ignoring reference to namespaces when using DOM XML functions.
Reproduce code:
---------------
$oXsl = domxml_open_file("test.xsl");
$ctx=xpath_new_context($oXsl);
$ctx->xpath_register_ns("xsl","http://www.w3.org/1999/XSL/Transform");
$aoIncludeNodes = $oXsl->get_elements_by_tagname("xsl:include",$ctx);
print_r($aoIncludeNodes);
Expected result:
----------------
Should produce array of all <xsl:include> nodes in the XSL.
This works OK on PHP4.3.2 on Windows.
Actual result:
--------------
Empty array returned but will work if following line is used instead:
$aoIncludeNodes = $oXsl->get_elements_by_tagname("include",$ctx);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27565&edit=1
Thread (3 messages)