cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/serialization HTMLSerializer.java AbstractTextSerializer.java
Date Fri, 23 Aug 2002 11:06:15 GMT
cziegeler    2002/08/23 04:06:15

  Modified:    src/java/org/apache/cocoon/serialization HTMLSerializer.java
                        AbstractTextSerializer.java
  Log:
  Changing intialization order
  
  Revision  Changes    Path
  1.9       +13 -3     xml-cocoon2/src/java/org/apache/cocoon/serialization/HTMLSerializer.java
  
  Index: HTMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/HTMLSerializer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HTMLSerializer.java	23 Aug 2002 09:47:39 -0000	1.8
  +++ HTMLSerializer.java	23 Aug 2002 11:06:15 -0000	1.9
  @@ -53,6 +53,8 @@
   import javax.xml.transform.OutputKeys;
   import javax.xml.transform.sax.TransformerHandler;
   import javax.xml.transform.stream.StreamResult;
  +import org.apache.avalon.framework.configuration.Configuration;
  +import org.apache.avalon.framework.configuration.ConfigurationException;
   import java.io.IOException;
   import java.io.OutputStream;
   
  @@ -70,6 +72,15 @@
       }
   
       /**
  +     * Set the configurations for this serializer.
  +     */
  +    public void configure(Configuration conf)
  +    throws ConfigurationException {
  +        super.configure( conf );
  +        this.format.put(OutputKeys.METHOD,"html");
  +    }
  +
  +    /**
        * Set the <code>OutputStream</code> where the requested resource should
        * be serialized.
        */
  @@ -78,9 +89,8 @@
           try {
               super.setOutputStream(out);
               TransformerHandler handler = this.getTransformerHandler();
  -            this.format.put(OutputKeys.METHOD,"html");
  -            handler.setResult(new StreamResult(this.output));
               handler.getTransformer().setOutputProperties(this.format);
  +            handler.setResult(new StreamResult(this.output));
               this.setContentHandler(handler);
               this.setLexicalHandler(handler);
           } catch (Exception e) {
  
  
  
  1.15      +2 -2      xml-cocoon2/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
  
  Index: AbstractTextSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AbstractTextSerializer.java	23 Aug 2002 09:47:39 -0000	1.14
  +++ AbstractTextSerializer.java	23 Aug 2002 11:06:15 -0000	1.15
  @@ -179,7 +179,7 @@
           // return this.getTransformerFactory().newTransformerHandler();
           // FIXME - This is a workaround for bug #5779 of Xalan
           return this.getTransformerFactory().newTransformerHandler(
  -                      new javax.xml.transform.stream.StreamSource(new java.io.StringReader(org.apache.cocoon.xml.XMLUtils.xalanBugStylesheet)));
  +               new javax.xml.transform.stream.StreamSource(new java.io.StringReader(org.apache.cocoon.xml.XMLUtils.xalanBugStylesheet)));
           // End workaround
       }
   
  
  
  

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