Hi,

(Im trying to implement 
  XMLFilter -> Transform -> XMLFilter -> XMLFilter)


The following is where Im up to, all of the XMLFilters seem to be doing their 
job, but I can't see how to get hold of the result... the contents of the 
'result' object here is just the xml prologue.


TransformerFactory tf = TransformerFactory.newInstance();
SAXTransformerFactory stf = (SAXTransformerFactory) tf;

//get hold of content handler
TransformerHandler th = stf.newTransformerHandler();            

//set up stylesheet as a filter
XMLFilter xf = stf.newXMLFilter(new StreamSource(xsl));
            
//filter chain with stylesheet 2nd of 4 sax filters            
first.setParent(XMLReaderFactory.createXMLReader(XML_READER_CLASS_NAME));

xf.setParent(second);

second.setParent(xf);
third.setParent(second);

third.setResult(result);
third.setContentHandler(th);
            
third.parse(xml); 


(first second and third are just usual sax.XMLFilters, let me know the correct 
terminology if I sound dodgy here, with xf being a 
SAXTransformerFactory.newXMLFilter())

I've seen some examples using SerializerFactory... is this Xalan specific?  Is 
there a trax based approach?

Thanks for any help, apologies for poor examples / descriptions...

cheers
andrew

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 

Reply via email to