cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gree...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/formatter AbstractFormatter.java HTMLFormatter.java XHTMLFormatter.java XMLFormatter.java
Date Mon, 26 Mar 2001 15:30:33 GMT
greenrd     01/03/26 07:30:33

  Modified:    .        changes.xml
               src/org/apache/cocoon/formatter AbstractFormatter.java
                        HTMLFormatter.java XHTMLFormatter.java
                        XMLFormatter.java
  Log:
  added ability to omit xml decl
  
  Revision  Changes    Path
  1.226     +4 -1      xml-cocoon/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/changes.xml,v
  retrieving revision 1.225
  retrieving revision 1.226
  diff -u -r1.225 -r1.226
  --- changes.xml	2001/03/26 00:20:45	1.225
  +++ changes.xml	2001/03/26 15:30:27	1.226
  @@ -4,7 +4,7 @@
   
   <!--
     History of Cocoon changes   
  -  $Id: changes.xml,v 1.225 2001/03/26 00:20:45 greenrd Exp $ 
  +  $Id: changes.xml,v 1.226 2001/03/26 15:30:27 greenrd Exp $ 
   -->
   
   <changes title="History of Changes">
  @@ -18,6 +18,9 @@
     </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="RDG" type="add" due-to="Sebastien Koechlin" due-to-email="skoechlin@ivision.fr">
  +   Added ability to omit xml declaration from output (see cocoon.properties).
  +  </action>
     <action dev="RDG" type="fix" due-to="Jay Freeman" due-to-email="saurik@saurik.com">
      Fixed default encoding bug introduced by the changes for FOP 0.16 below.
     </action>
  
  
  
  1.7       +4 -2      xml-cocoon/src/org/apache/cocoon/formatter/AbstractFormatter.java
  
  Index: AbstractFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/formatter/AbstractFormatter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractFormatter.java	2001/03/26 00:20:46	1.6
  +++ AbstractFormatter.java	2001/03/26 15:30:30	1.7
  @@ -1,4 +1,4 @@
  -/*-- $Id: AbstractFormatter.java,v 1.6 2001/03/26 00:20:46 greenrd Exp $ -- 
  +/*-- $Id: AbstractFormatter.java,v 1.7 2001/03/26 15:30:30 greenrd Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -59,7 +59,7 @@
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.6 $ $Date: 2001/03/26 00:20:46 $
  + * @version $Revision: 1.7 $ $Date: 2001/03/26 15:30:30 $
    */
   
   public abstract class AbstractFormatter 
  @@ -115,6 +115,8 @@
           if (lineWidth != null) {
               format.setLineWidth(Integer.parseInt(lineWidth));
           }        
  +
  +        omitXMLDeclaration = (String) conf.get("omit-XML-declaration");
       }
   
       public String getEncoding() {
  
  
  
  1.8       +3 -3      xml-cocoon/src/org/apache/cocoon/formatter/HTMLFormatter.java
  
  Index: HTMLFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/formatter/HTMLFormatter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HTMLFormatter.java	2001/03/01 16:05:39	1.7
  +++ HTMLFormatter.java	2001/03/26 15:30:31	1.8
  @@ -1,4 +1,4 @@
  -/*-- $Id: HTMLFormatter.java,v 1.7 2001/03/01 16:05:39 greenrd Exp $ -- 
  +/*-- $Id: HTMLFormatter.java,v 1.8 2001/03/26 15:30:31 greenrd Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -62,12 +62,12 @@
    * have any semantic information about the document type being formatted,
    * this class handles tags like <em>&lt;br/&gt;</em> and transforms
them to
    * HTML that non-XML-aware browsers can understand. Note that this creates
  - * markap that is non-well-formed XML. If you want to be able to send HTML 
  + * markup that is non-well-formed XML. If you want to be able to send HTML 
    * code to old-browser but still create well-formed XML, use the XHTMLFormatter
    * instead.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.7 $ $Date: 2001/03/01 16:05:39 $
  + * @version $Revision: 1.8 $ $Date: 2001/03/26 15:30:31 $
    */
   
   public class HTMLFormatter extends AbstractFormatter {
  
  
  
  1.3       +7 -3      xml-cocoon/src/org/apache/cocoon/formatter/XHTMLFormatter.java
  
  Index: XHTMLFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/formatter/XHTMLFormatter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XHTMLFormatter.java	2001/03/01 16:05:40	1.2
  +++ XHTMLFormatter.java	2001/03/26 15:30:31	1.3
  @@ -1,4 +1,4 @@
  -/*-- $Id: XHTMLFormatter.java,v 1.2 2001/03/01 16:05:40 greenrd Exp $ -- 
  +/*-- $Id: XHTMLFormatter.java,v 1.3 2001/03/26 15:30:31 greenrd Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -65,7 +65,7 @@
    * (for example, <em>&lt;br /&gt;</em>).
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.2 $ $Date: 2001/03/01 16:05:40 $
  + * @version $Revision: 1.3 $ $Date: 2001/03/26 15:30:31 $
    */
   
   public class XHTMLFormatter extends AbstractFormatter {
  @@ -81,7 +81,11 @@
       public void init(Configurations conf) {
           super.init(conf);
           format.setMethod(Method.XHTML);
  -        format.setOmitXMLDeclaration(true);
  +        if( omitXMLDeclaration != null) {
  +            format.setOmitXMLDeclaration(Boolean.valueOf(omitXMLDeclaration).booleanValue());
  +        } else {
  +            format.setOmitXMLDeclaration(true);
  +        }
       }       
           
       public void format(Document document, OutputStream stream, Dictionary p) throws Exception
{
  
  
  
  1.7       +7 -3      xml-cocoon/src/org/apache/cocoon/formatter/XMLFormatter.java
  
  Index: XMLFormatter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/formatter/XMLFormatter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLFormatter.java	2001/03/01 16:05:41	1.6
  +++ XMLFormatter.java	2001/03/26 15:30:32	1.7
  @@ -1,4 +1,4 @@
  -/*-- $Id: XMLFormatter.java,v 1.6 2001/03/01 16:05:41 greenrd Exp $ -- 
  +/*-- $Id: XMLFormatter.java,v 1.7 2001/03/26 15:30:32 greenrd Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -58,7 +58,7 @@
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.6 $ $Date: 2001/03/01 16:05:41 $
  + * @version $Revision: 1.7 $ $Date: 2001/03/26 15:30:32 $
    */
   
   public class XMLFormatter extends AbstractFormatter {
  @@ -74,7 +74,11 @@
       public void init(Configurations conf) {
           super.init(conf);
           format.setMethod(Method.XML);
  -        format.setOmitXMLDeclaration(false);
  +        if( omitXMLDeclaration != null) {
  +            format.setOmitXMLDeclaration(Boolean.valueOf(omitXMLDeclaration).booleanValue());
  +        } else {
  +            format.setOmitXMLDeclaration(false);
  +        }
       }
   
       public void format(Document document, OutputStream stream, Dictionary p) throws Exception
{
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message