[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Saxon Serializing and COntentHandler

Subject: Saxon Serializing and COntentHandler
From: Neville Thomas <nthomas@xxxxxxxxx>
Date: Fri, 17 Dec 2004 14:11:07 -0500
saxon8b
In Xalan I am able to do the following:

Serializer serializer = SerializerFactory.getSerializer
(OutputPropertiesFactory.getDefaultMethodProperties("xml")); serializer.setOutputStream(System.out);
xmlFilter2.setContentHandler(serializer.asContentHandler());


How will I acheive similar with Saxon8b.
I tried using that ContentEmitter along with the ReceivingContentHandler (see below) but I dont think I am setting up the Configuration Object properly.


Properties xep = new Properties();
     NamePool np = NamePool.getDefaultNamePool();
     Configuration config = new Configuration();
     config.setNamePool(np);

XMLEmitter xe = new XMLEmitter();
xe.setStreamResult(new StreamResult(new PrintWriter(System.out, true)));
xe.setOutputProperties(xep);
xe.setConfiguration(config);
ReceivingContentHandler rch = new ReceivingContentHandler();
rch.setReceiver(xe);
rch.setNamePool(np);
xmlFilter2.setContentHandler(rch); xmlFilter2.parse(new InputSource("SouthPole.xml"));



Neville


--
==================================================================
Virtual Technology Corporation |  5510 Cherokee Rd, Suite 350
                               |  Alexandria, VA 22312-2300
   _/   _/_/_/_/_/_/_/_/_/     |
  _/         _/                |
  _/    _/  _/  _/_/_/_/       |               Neville Thomas
  _/   _/  _/  _/              |  E-Mail addr: nthomas@xxxxxxxxx
  _/  _/  _/  _/               |  Office     : 703.333.6233
   _/_/  _/  _/                |  Fax        : 703.658.7057
    _/  _/  _/_/_/_/           |
                               |
===================================================================
        "Software and Systems Engineering Professionals."
===================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.