yawnmoth wrote:
Quote:
On Dec 7, 5:55 pm, David Mark <dmark.cins...@gmail.comwrote:
Quote:
Quote:
>>Another thing is that the whole behavior
>> xmlHttp.responseXML.getElementsByTagName("a")[0].nodeValue == null
>>doesn't have any sense to me, even if it's twenty times standard
>>compliant: but it is maybe because I am missing something important
>>out of the Big Picture. It would be nice to have some comments on it
>You are missing the fact that text nodes are not part of element
>nodes. What would you propose the nodeValue of an element node
>return?
In PHP, it seems to return the text node... is PHP wrong?
PHP (5)'s DOM extension implements the `nodeValue' property of DOMElement
objects, apparently for convenience, to yield the concatenated node values
of the descendant text nodes of the element node, like the `textContent'
property from W3C DOM Level 3 that it also implements:
http://php.net/DOM
But since it also implements `textContent', `nodeValue' should not yield the
same value. In fact, the value that is yielded there contradicts with W3C
DOM Level 2+ Core that says the `nodeValue' property of objects implementing
the Element interface should have the value `null':
http://www.w3.org/TR/DOM-Level-3-Cor...#ID-1950641247
If it was the intention to implement that interface, that would mean PHP is
wrong here, indeed.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann