cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: cvs commit: cocoon-2.1 status.xml
Date Mon, 28 Jul 2003 14:38:23 GMT
Gianugo Rabellino wrote:
> Geoff Howard wrote:
> 
>>>   @@ -647,7 +706,7 @@
>>>                    // import the fragment
>>>                    Node importNode = resource.importNode(fragment, 
>>> true);
>>>                    if ( path.equals("") ) {  // this is allowed in write
>>>   -                    resource.appendChild(importNode);
>>>   +                    resource.appendChild(importNode.getFirstChild());
>>>                        message = "entire source overwritten";
>>
>>
>>
>> Was this bit the DOM "bug"?  Was it caused by whitespace outside root 
>> node when overwriting the whole document?  There was some discussion 
>> about 9 months ago where some (at least one) thought that was 
>> mandatory behavior and the responsibility of the fragment author (or 
>> pipeline) to remove whitespace.
>>
>> If you've changed that behavior I'm personally very +1 but it may be 
>> worth a discussion.
> 
> 
> I don't think it's a matter of whitespace. I'm not a DOM guru, but if 
> the firstChild is a whitespace node it should be returned by the 
> getFistChild() call as well. Actually, I am a bit puzzled too, since the 
> SWT wasn't working on my setup but it was on others (I suspect it has to 
> do with the latest JVM that I'm using), no matter what sample documents 
> I gave to him. With this one liner, everything was working OK, so I just 
> thought to change it. But I'm more than open to any discussion. :-)

Nope, sounds like it's not needed.  I was making connections from 
distant memory.

Geoff



Mime
View raw message