We are working on a servlet which does some basic XSLT transformation.  We would like to use the latest Xalan for this.  The sample in the Xalan distribution which is closest to what we want is the DOM2DOM sample.

However, it is completely broken!

We did the following:

1) Install Java 1.4.2_02

2) Download http://apache.secsup.org/dist/xml/xalan-j/xalan-j-current-bin.zip

3) Unzip it to c:\download\xalan-j-current-bin and cd to c:\download\xalan-j-current-bin\xalan-j-2_5_2\samples\DOM2DOM

4) Run the DOM2DOM sample with "java -classpath ..\..\bin\xalan.jar;..\..\bin\xercesImpl.jar;..\..\bin\xalanSamples.jar;..\..\bin\xml-apis.jar DOM2DOM"

5) Get the following error:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xml.utils.TreeWalker.<init>(Lorg/
xml/sax/ContentHandler;Lorg/apache/xml/utils/DOMHelper;)V
        at org.apache.xml.serializer.ToStream.serialize(ToStream.java:251)
        at DOM2DOM.main(DOM2DOM.java:134)

There is *no* other CLASSPATH set in our environment.

When was the last time DOM2DOM was tested or otherwise known to work?  What is the problem and what is the fix?

We are working on other ways to deal with this problem, but it is to say the least pretty unsatisfactory that Xalan ships with broken samples, particularly such a basic sample�.

All help appreciated.
Sincerely,
Rob Jellinghaus

robj at nimblefish dot com

 

Reply via email to