dleslie     00/10/18 11:01:42

  Modified:    java/samples/SAX2SAX SAX2SAX.java
  Removed:     java/samples/SAX2SAX foo.out
  Log:
  Updated to use org.apache.xml.serialize.transition in place of the
  Xerces package.
  
  Revision  Changes    Path
  1.4       +8 -7      xml-xalan/java/samples/SAX2SAX/SAX2SAX.java
  
  Index: SAX2SAX.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/samples/SAX2SAX/SAX2SAX.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SAX2SAX.java      2000/10/16 17:51:01     1.3
  +++ SAX2SAX.java      2000/10/18 18:01:41     1.4
  @@ -76,9 +76,9 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.XMLReaderFactory;
   
  -import org.apache.xml.serialize.SerializerFactory;
  -import org.apache.xml.serialize.Serializer;
  -import org.apache.xml.serialize.OutputFormat;
  +import org.apache.serialize.SerializerFactory;
  +import org.apache.serialize.Serializer;
  +import org.apache.serialize.OutputFormat;
   
   import java.io.FileOutputStream;
   import java.io.IOException;
  @@ -123,10 +123,11 @@
       // IV. Perform the transformation.
   
       // Set up the ContentHandler for the output.
  -    Result result = new Result(new FileOutputStream("foo.out"));
  -    SerializerFactory sfactory = 
SerializerFactory.getSerializerFactory("xml");
  -    Serializer serializer = sfactory.makeSerializer 
(result.getCharacterStream(), 
  -                                                                             
 new OutputFormat());
  +     FileOutputStream fos = new FileOutputStream("foo.out");
  +    Result result = new Result(fos);
  +    Serializer serializer = SerializerFactory.getSerializer("xml");
  +    serializer.setOutputStream(fos);
  +
       transformer.setContentHandler(serializer.asContentHandler());
   
       // Set up the ContentHandler for the input.
  
  
  

Reply via email to