Bug #15918 Updated: DomAttribute missing "type" property

From: Date: Thu, 07 Mar 2002 16:37:31 +0000
Subject: Bug #15918 Updated: DomAttribute missing "type" property
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1931@lists.php.net to get a copy of this message
ID: 15918 Updated by: jtate@php.net -Summary: DomAttribute missing "type" property Reported By: bigredlinux@yahoo.com Status: Assigned Bug Type: DOM XML related Operating System: Linux PHP Version: 4.1.2 Assigned To: jtate New Comment: I've added type nodes to DomAttributes. (I also added them to CDATA nodes too). I'll take a look at the name stuff, but it will require a little more time to look into. I'll get the type nodes into the 4.2.0 release tree so that it'll be in the next release. Previous Comments: ------------------------------------------------------------------------ [2002-03-07 11:19:05] bigredlinux@yahoo.com Let me allow myself to be less ambiguous on the last comment I made. It would be nice if every class also consistently had a property for the name (no need for function I guess, since it would not be in the way of the current design to make a function to return every property). The reason I say this is because often times, in the case of classes such as DomText, the name is actually just "#text" and DomDocument is "#document". There is a chart on the w3c page for the nodeNames that correspond to the different classes and without this property consistent for every php DOM class, I have to use a huge switch statement to run through the different types of nodes and figure out what the name would be. Just seems like a trivial fix that would make the classes more complete. Thanks! ------------------------------------------------------------------------ [2002-03-07 10:15:06] jtate@php.net This should be a quick fix. ------------------------------------------------------------------------ [2002-03-06 19:37:26] bigredlinux@yahoo.com It appears that the type property is missing from the DomAttribute class, which makes it quite difficult to determine the type of node, since it is necessary to code a workaround for cases where this property is missing. It would be nice if there was a function nodeType that would return this, and possibly a function nodeName to return other rather case sensitive results. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15918&edit=1

« previous php.bugs (#1931) next »