You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Steven Kaufman <St...@individual.com> on 2000/08/22 23:03:05 UTC

Problem using javax api and XSLTProcessor

Hi, 

I'm trying to use the Xalan XSLTProcessor class to process an XML document
and XSL stylesheet. I want to first use an XML parser to parse an XML file
and create a Document object in memory. I can then pass the Document object
and XSL stylesheet filename to XSLTProcessor.process(). This works for me
when I specifically create an instance of the Xerces XML parser in my code
to create the Document object.

This does not work, however, if I use the javax interfaces to wrap around a
generic XML parser. (I would like to have the ability to plug in different
XML parsers at runtime). The output I get is only the data in the XML tree
without any formatting applied. I have attached a small test program as well
as the XML file, XSL stylesheet and the output I get. If you have any
insight as to what I'm doing wrong when using the javax interfaces, I would
greatly appreciate it. Also, do you know if there is a way to use a generic
interface like javax to wrap around both an XML parser and XSLT processor? I
would like the ability to plug in different parsers / processors without
changing my code.

My classpath contains the following:

J:\xalan_1_2_D01\xalan.jar;J:\xalan_1_2_D01\xerces.jar;

Thanks very much,

-Steve Kaufman