W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2003

Re: Questions about replaceWholeText

From: Arnaud Le Hors <lehors@us.ibm.com>
Date: Thu, 11 Sep 2003 10:45:55 -0400
Message-ID: <3F608AA3.3090509@us.ibm.com>
To: www-dom@w3.org

This is correct. If you have any input on how to clarify the spec, 
please, let us know! :-)
Arnaud  Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.

Andrew Clover wrote:
> "Vadim O. Ustiansky" <ustiansk@sai.msu.ru> wrote:
>>I am new to DOM and after reading the specification of
>>replaceWholeText method I have several questions. I suspect
>>them to be caused by my poor English
> I don't know, I found some of the wording of the wholeText stuff a little
> hairy too!
> I can't speak for the Editors, but this is my understanding of
> replaceWholeText and how I have implemented it in pxdom.
>>  1) What is null when the replacement text is empty?
>>     Is it method's return value or returned node's text
>>     content that is null?
> The return value. If the whole text is replaced by no text, there will
> be no Text node left to return, which is why we get null.
>>  2) Suppose I have three logically-adjacent text nodes
>>     (N1, N2, N3). Let N2 be readonly and the others are
>>     not readonly. If I call replaceWholeText('some text') on
>>     N2 what result should I expect?
> N4, containing text 'some text'. N1, N2 and N3 will be removed from the
> document. In N2's case its parent EntityReference will be removed instead
> of N2 itself (assuming that is the reason for N2 being readonly).
Received on Thursday, 11 September 2003 10:45:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:11 UTC