DOM L3 Core spec.: textContent specification ambiguity

Regarding the DOM Level 3 Core specification currently at
http://www.w3.org/TR/DOM-Level-3-Core/core.html:

The wording in the definition of the textContext attribute of the
Note interface seems to be ambiguous (or at least misleading).

The text says:

   "On getting, no serialization is performed, the returned string
    does not contain any markup."

The intent of the latter part of that sentence is to say that the
string does not contain any added markup to represent any child
elements, etc.

However, that wording sounds like it's saying that the string cannot
contain any text that looks like markup.


If the difference isn't clear, consider getting the text content of
the root element of this document:

   <root><sub>&lt;e/&gt;</sub><root>

The textContent attribute string would be "<e/>", right?

That string _does_ contain markup in the sense of text that looks
like markup (that would be interpreted as markup if it were parsed
as XML), even though the string does _not_ contain markup representing
the child "sub" element (at the level of the (presumed) text that
actually _was_ parsed).



Daniel

Received on Tuesday, 8 June 2010 17:44:03 UTC