[EMAIL PROTECTED] wrote:
gianugo 2003/07/28 04:28:22

Modified: src/java/org/apache/cocoon/transformation
SourceWritingTransformer.java
src/documentation/xdocs/userdocs/transformers
sourcewriting-transformer.xml
. status.xml
Log:
Added delete capabilities to the SourceWritingTransformer, while solving
a DOM bug(?) with new documents creation.
Revision Changes Path
1.5 +77 -9 cocoon-2.1/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java

...


  @@ -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.

Geoff



Reply via email to