ID:               34997
 User updated by:  php dot net at punk dot co dot nz
 Reported By:      php dot net at punk dot co dot nz
 Status:           Wont fix
 Bug Type:         DOM XML related
 Operating System: Windows XP
 PHP Version:      5.0.5
 New Comment:

Does this impact memory usage and performance on large documents? As it
appears to duplicate a lot of data.

>From what I can tell this is not an extension, more a violation of the
spec. The spec indicates it should be null, not undefined and open to
interpretation.

IMHO it should be changed to reflect the spec and set to null, or if
some people do use it, then maybe made an optional setting? And, if
doing that, it might be more useful if it didn't concat all the
descendant text nodes into the parent, but just contained only the
content from any attached text/CDATA nodes. (Actually then I'd find it
useful.)

/2c


Previous Comments:
------------------------------------------------------------------------

[2005-10-27 01:10:44] [EMAIL PROTECTED]

This was done intentionally and as an extension to the DOM specs. 
Provides quick access to Element content and is read-only for
DOMElement. This is the only node type that this exception was made
for.

------------------------------------------------------------------------

[2005-10-27 00:39:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-10-27 00:37:58] php dot net at punk dot co dot nz

Description:
------------
The nodeValue attribute appears to be set to the concatenation of the
contents of all child text nodes.

As far as I understand according to the specification (p36,
DOM2-Core.pdf, w3.org) the nodeValue should be set to NULL for Element
node types (and many other node types).

This may be a problem for other node types as well.

Reproduce code:
---------------
http://www.punk.co.nz/php.net/nodeValue-test.zip

Includes a sample xml file and output.txt.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34997&edit=1

Reply via email to