Req #67507 [NEW]: Attribute namespace retrieval

From: Date: Tue, 24 Jun 2014 15:54:18 +0000
Subject: Req #67507 [NEW]: Attribute namespace retrieval
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186325@lists.php.net to get a copy of this message
From: akos dot toth at cheppers dot com Operating system: Ubuntu 14.04 LTS PHP version: 5.5.13 Package: SimpleXML related Bug Type: Feature/Change Request Bug description:Attribute namespace retrieval Description: ------------ Why? There is literally no reason for the case highlighted in the test script to not produce the expected output. This is supposed to be simple xml, not overly complicated and utterly useless for even parsing (not to mention creating) xml structures. Test script: --------------- $object = simplexml_load_string('<root><base xml:lang="en" /></root>'); print('U' . $object->base->attributes('http://www.w3.org/XML/1998/namespace')->lang); print('X' . $object->base->attributes('xml')->lang); Expected result: ---------------- Prints "UenXen" (both methods work for retrieving the attribute). Actual result: -------------- Prints "UenX" (simply making the referenced namespace 'xml' does not work, instead I have to add that goddamn bloated URL). -- Edit bug report at https://bugs.php.net/bug.php?id=67507&edit=1 --

« previous php.bugs (#186325) next »