From:             skissane at ics dot mq dot edu dot au
Operating system: Linux
PHP version:      5CVS-2003-09-25 (dev)
PHP Bug Type:     XML related
Bug description:  XML namespaces broken in PHP5

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/[EMAIL PROTECTED]
http://example.com/[EMAIL PROTECTED]


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


-- 
Edit bug report at http://bugs.php.net/?id=25666&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25666&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25666&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25666&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25666&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25666&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25666&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25666&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25666&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25666&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25666&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25666&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25666&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25666&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25666&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25666&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25666&r=float

Reply via email to