[xsl] Applying XSLT to SAX Reader

Subject: [xsl] Applying XSLT to SAX Reader
From: "Bruce McDougald" <bmcdougald@xxxxxxxxxxx>
Date: Mon, 7 Oct 2002 12:22:17 -0500
I am having a problem trying to transform output from a SAX reader.  Looking
at the XALAN FAQ,
I believe the way I am supposed to do this is to use a "pipe", or "chain"
method.  I think I have
a code setup properly to handle this, but the XSL stylesheet
is not being applied to my parsed XML, I just get the parsed XML out of my
SAX reader events
displayed back to the screen.  This is driving me crazy!
I've spent 3 days trying to feed this parsed XML into a transformation
process, but NO LUCK!!

Here is the code I have written so far, if needed, I will post the code for
the xmlParse filter:

Note:  xmlParse class to extends XMLFilterImpl and handles my SAX events.
Also, in my serializer OutputProperties method, I have tried setting it to
'html', 'xml', and
'out', and the output is the same everytime not matter what.

Thanks for your help.


    TransformerFactory tFactory = TransformerFactory.newInstance();

    if (tFactory.getFeature(SAXSource.FEATURE) &&

      XMLReader reader = XMLReaderFactory.createXMLReader();

      SAXTransformerFactory saxTFactory = ((SAXTransformerFactory)

      XMLFilter xmlFilter1 = new xmlParse();

      XMLFilter xmlFilter2 =


      Serializer serializer = SerializerFactory.getSerializer







 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread