W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2010

DOM L3 Core spec.: textContent specification ambiguity

From: Daniel Barclay <daniel@fgm.com>
Date: Tue, 8 Jun 2010 13:43:35 -0400
Message-ID: <4C0E8147.1010905@fgm.com>
To: <www-dom@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT