php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25666 XML namespaces broken in PHP5
Submitted: 2003-09-25 23:29 UTC Modified: 2003-09-29 07:35 UTC
From: skissane at ics dot mq dot edu dot au Assigned:
Status: Closed Package: XML related
PHP Version: 5CVS-2003-09-25 (dev) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 + 30 = ?
Subscribe to this entry?

 
 [2003-09-25 23:29 UTC] skissane at ics dot mq dot edu dot au
Description:
------------
Namespace support by the xml_* functions is broken in PHP5 latest snapshot (works fine in PHP4).

Reproduce code:
---------------
<?php
function startElement($parser,$name,$attribs) {
    echo $name . "\n";
}

function endElement($parser,$name) {
}

$parser = xml_parser_create_ns("UTF-8","@");
xml_set_element_handler($parser,'startElement','endElement');
xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
xml_parse($parser,
          "<foo:a xmlns:foo=\"http://example.com/foo\" xmlns:bar=\"http://example.com/bar\"><bar:b /></foo>\n");
xml_parser_free($parser);
?>


Expected result:
----------------
PHP 4.3.3 gives output:

http://example.com/foo@a
http://example.com/bar@b


Actual result:
--------------
http://example.com/foo:a
bar:b


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-26 03:54 UTC] sniper@php.net
What was the configure line you used to configure PHP?

 [2003-09-26 07:48 UTC] skissane at ics dot mq dot edu dot au
My configure line was:
./configure --disable-cgi

That's all.
 [2003-09-29 07:35 UTC] rrichards@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 20:01:30 2024 UTC