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 TextSerializer.java AbstractTextSerializer.java XMLSerializer.java
Date Wed, 04 Dec 2002 08:43:28 GMT
cziegeler    2002/12/04 00:43:27

  Modified:    src/java/org/apache/cocoon/serialization Tag:
                        cocoon_2_0_3_branch HTMLSerializer.java
                        TextSerializer.java AbstractTextSerializer.java
                        XMLSerializer.java
  Log:
  Synchronizing fixes for serializers with head
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.2   +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.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- HTMLSerializer.java	21 Nov 2002 15:06:49 -0000	1.5.2.1
  +++ HTMLSerializer.java	4 Dec 2002 08:43:27 -0000	1.5.2.2
  @@ -55,6 +55,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.OutputStream;
   
   /**
  @@ -69,13 +71,21 @@
       public HTMLSerializer() {
       }
   
  +    /**
  +     * Set the configurations for this serializer.
  +     */
  +    public void configure(Configuration conf)
  +    throws ConfigurationException {
  +        super.configure( conf );
  +        this.format.put(OutputKeys.METHOD,"html");
  +    }
  +
       public void setOutputStream(OutputStream out) {
           try {
               super.setOutputStream(out);
               handler = getTransformerFactory().newTransformerHandler();
  -            format.put(OutputKeys.METHOD,"html");
  +            handler.getTransformer().setOutputProperties(this.format);
               handler.setResult(new StreamResult(this.output));
  -            handler.getTransformer().setOutputProperties(format);
               this.setContentHandler(handler);
               this.setLexicalHandler(handler);
           } catch (Exception e) {
  
  
  
  1.5.2.2   +13 -3     xml-cocoon2/src/java/org/apache/cocoon/serialization/TextSerializer.java
  
  Index: TextSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/TextSerializer.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- TextSerializer.java	21 Nov 2002 15:06:49 -0000	1.5.2.1
  +++ TextSerializer.java	4 Dec 2002 08:43:27 -0000	1.5.2.2
  @@ -55,6 +55,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.OutputStream;
   
   /**
  @@ -69,13 +71,21 @@
       public TextSerializer() {
       }
   
  +    /**
  +     * Set the configurations for this serializer.
  +     */
  +    public void configure(Configuration conf)
  +    throws ConfigurationException {
  +        super.configure( conf );
  +        this.format.put(OutputKeys.METHOD,"text");
  +    }
  +
       public void setOutputStream(OutputStream out) {
           try {
               super.setOutputStream(out);
               handler = getTransformerFactory().newTransformerHandler();
  -            format.put(OutputKeys.METHOD,"text");
  -            handler.setResult(new StreamResult(this.output));
               handler.getTransformer().setOutputProperties(format);
  +            handler.setResult(new StreamResult(this.output));
               this.setContentHandler(handler);
               this.setLexicalHandler(handler);
          } catch (Exception e) {
  
  
  
  1.9.2.2   +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.9.2.1
  retrieving revision 1.9.2.2
  diff -u -r1.9.2.1 -r1.9.2.2
  --- AbstractTextSerializer.java	30 Jul 2002 01:49:22 -0000	1.9.2.1
  +++ AbstractTextSerializer.java	4 Dec 2002 08:43:27 -0000	1.9.2.2
  @@ -321,8 +321,8 @@
   
               TransformerHandler handler = factory.newTransformerHandler();
   
  -            handler.setResult(new StreamResult(writer));
               handler.getTransformer().setOutputProperties(format);
  +            handler.setResult(new StreamResult(writer));
   
               // Output a single element
               handler.startDocument();
  
  
  
  1.5.2.2   +13 -3     xml-cocoon2/src/java/org/apache/cocoon/serialization/XMLSerializer.java
  
  Index: XMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/XMLSerializer.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- XMLSerializer.java	21 Nov 2002 15:06:49 -0000	1.5.2.1
  +++ XMLSerializer.java	4 Dec 2002 08:43:27 -0000	1.5.2.2
  @@ -55,6 +55,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.OutputStream;
   
   /**
  @@ -69,13 +71,21 @@
       public XMLSerializer() {
       }
   
  +    /**
  +     * Set the configurations for this serializer.
  +     */
  +    public void configure(Configuration conf)
  +    throws ConfigurationException {
  +        super.configure( conf );
  +        this.format.put(OutputKeys.METHOD,"xml");
  +    }
  +
       public void setOutputStream(OutputStream out) {
           try {
               super.setOutputStream(out);
               this.handler = getTransformerFactory().newTransformerHandler();
  -            format.put(OutputKeys.METHOD,"xml");
  -            handler.setResult(new StreamResult(this.output));
               handler.getTransformer().setOutputProperties(format);
  +            handler.setResult(new StreamResult(this.output));
               this.setContentHandler(handler);
               this.setLexicalHandler(handler);
           } catch (Exception e) {
  
  
  

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