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(_at_)virtc(_dot_)com
_/ _/ _/ _/ | Office : 703.333.6233
_/_/ _/ _/ | Fax : 703.658.7057
_/ _/ _/_/_/_/ |
|
===================================================================
"Software and Systems Engineering Professionals."
===================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--