ID: 40567 Updated by: [EMAIL PROTECTED] Reported By: bpipe at mail dot ru -Status: Open +Status: Bogus Bug Type: Feature/Change Request PHP Version: 5.2.1 New Comment:
>i'm not sayng that you shouldn't allow to use it i'm sayng >that you should generate a notice about it, It's a valid character, so no notice would make sense. Previous Comments: ------------------------------------------------------------------------ [2007-02-22 08:32:48] bpipe at mail dot ru I; not sayng this is bug, i marked this as feature request ------------------------------------------------------------------------ [2007-02-22 08:28:41] bpipe at mail dot ru "element names are already validated and cause an error to be issued. The ":" char is a valid character in an element name" Yes ":" is valid character for element name, i'm not sayng that you shouldn't allow to use it i'm sayng that you should generate a notice about it, it;s lika casting float value to int value in C++ (cimpiler generate a notice about possible loss of data), same here, when user creates Element with ":" after document is saved the reslut will be not what he expect (this is lost of data) the part before ":" becomes NameSpace. ------------------------------------------------------------------------ [2007-02-21 17:16:17] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php element names are already validated and cause an error to be issued. The ":" char is a valid character in an element name ------------------------------------------------------------------------ [2007-02-20 22:07:26] bpipe at mail dot ru Description: ------------ DomDocument->CreateElement() I have a feature request, i think you should add a waring or notice when someone is calling CreateElement with ':' in node name. Like this one: $xsl->createElement('xsl:import'); instead of CreateElementNS, because this problem is hard to detect (document look like it should when you output it) I made this mistake myself and it took me 2 days to find out the problem, and only when i found the problem i managed to find any information about this in bugzilla. A notice when you create XML node with ':' in name could save 2 days of my life ) Really very hard to detect this mistake, i was googling, sitting in IRC and asking everyone for 48 hours without any result. And i think I'm not alone who "stepped on this rake" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40567&edit=1