Hello,
I am having a problem when we changed our class to pass xalan a SAXSource object instead of a StreamSource object.
When using a StreamSource everything worked properly as expected. But when we switched over to SAXSource, none of the templates in the stylesheet are being applied. The result is just the default template (copy text and apply templates to children) is applied. So we just see the text of the original xml document all concatenated together.
documentAsStream = getMethod.getResponseBodyAsStream(); InputSource inputSource = new InputSource(documentAsStream); SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(false);
You forgot to make your SAXParserFactory namespace aware, but don't bother. Use XMLReaderFactory instead. SAXParserFactory is a designed for SAX1. It does not work properly with SAX2, as your example shows.
--
Elliotte Rusty Harold [EMAIL PROTECTED] Effective XML (Addison-Wesley, 2003) http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA