cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.0/src/java/org/apache/cocoon/components/source SourceUtil.java
Date Mon, 17 Mar 2003 14:17:39 GMT
cziegeler    2003/03/17 06:17:38

  Modified:    src/java/org/apache/cocoon/xml AbstractDOMFragment.java
                        XMLUtils.java
               src/java/org/apache/cocoon/components/source SourceUtil.java
  Log:
  Sync with 2.1
  
  Revision  Changes    Path
  1.2       +3 -1      cocoon-2.0/src/java/org/apache/cocoon/xml/AbstractDOMFragment.java
  
  Index: AbstractDOMFragment.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.0/src/java/org/apache/cocoon/xml/AbstractDOMFragment.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractDOMFragment.java	9 Mar 2003 00:03:45 -0000	1.1
  +++ AbstractDOMFragment.java	17 Mar 2003 14:17:38 -0000	1.2
  @@ -103,7 +103,9 @@
           }
   
           // Stream the document fragment
  +        handler.startDocument();
           DOMStreamer streamer = new DOMStreamer(handler);
           streamer.stream(df);
  +        handler.endDocument();
       }
   }
  
  
  
  1.2       +7 -1      cocoon-2.0/src/java/org/apache/cocoon/xml/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.0/src/java/org/apache/cocoon/xml/XMLUtils.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLUtils.java	9 Mar 2003 00:03:46 -0000	1.1
  +++ XMLUtils.java	17 Mar 2003 14:17:38 -0000	1.2
  @@ -226,8 +226,14 @@
               transformerHandler = ((SAXTransformerFactory)TransformerFactory.newInstance()).newTransformerHandler();
               transformerHandler.getTransformer().setOutputProperties(format);
               transformerHandler.setResult(new StreamResult(writer));
  +            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
  +                transformerHandler.startDocument();
  +            } 
               DOMStreamer domStreamer = new DOMStreamer(transformerHandler, transformerHandler);
               domStreamer.stream(node);
  +            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
  +                transformerHandler.endDocument();
  +            } 
               return writer.toString();
           } catch (javax.xml.transform.TransformerException local) {
               throw new ProcessingException("TransformerException: " + local, local);
  
  
  
  1.2       +3 -1      cocoon-2.0/src/java/org/apache/cocoon/components/source/SourceUtil.java
  
  Index: SourceUtil.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.0/src/java/org/apache/cocoon/components/source/SourceUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SourceUtil.java	9 Mar 2003 00:02:32 -0000	1.1
  +++ SourceUtil.java	17 Mar 2003 14:17:38 -0000	1.2
  @@ -396,7 +396,9 @@
                   ContentHandler contentHandler = ws.getContentHandler();
                   DOMStreamer streamer = new DOMStreamer(contentHandler);
   
  +                contentHandler.startDocument();
                   streamer.stream(frag);
  +                contentHandler.endDocument();
               } else {
                   // and now serializing...
                   // Lookup the Serializer
  
  
  

Mime
View raw message