Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Kevin Newsom

Greenhorn
+ Follow
since Jul 02, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin Newsom

I got it working in the manner that it should. I had to place the appropriate jar files in the lib/ext folder. Having them in the class path didn't seem to cut it.
Well, I got this to work by implanting the code from XMLReaderFactory into my parsing class. In particular the line:
return (XMLReader)(Class.forName(className).newInstance());
doesn't throw a class not found exception when it is within 'my' class that parses the document.
I still don't know why it wouldn't work before.
I still think I have a problem when using Xalan but we'll see.
I'm touching this in the hopes of someone seeing it at the top of the list. I'm really stumped on this problem.
I have a series of SAX2 applications that use the constructor SAXParser() to create an instance of the parser.
XMLReader reader = new SAXParser();
These applications work fine.
The O'Reilly book on Java and XML indicates that this class (SAXParser) implements the org.xml.sax.XMLReader interface (pg. 50). If I change my code to use XMLReader instead of SAXParser, I get a ClassNotFoundException: org.apache.xerces.parsers.SAXParser.
Here's the code line that changed:
XMLReader parser = XMLReaderFactory.createXMLReader(
"org.apache.xerces.parsers.SAXParser");
Can anyone explain to me why? This problem is also causing me troubles when trying to use Xalan.
I've cleaned things up a little. Now I'm getting a different ClassNotFound error message. This one involves org.apache.xerces.parser.SAXParser. However, this class exists! It is rooted correctly with regard to my class path. And my other SAX2 applications work. It would appear that the Xalan packages are looking for the SAX2 packages and not finding them (even though they are there). What a mess. Do have any further suggestions?
Thanks.
I've installed the apache xalan package and I cannot get even the simplest sample to run. Sigh.
My classpath is: c:\winnit\java\classes;.;c:\winnt\java\classes\xerces.java;c;\winnt\java\classes.xalan.jar
The xerces.jar *is* from the xalan distribution.
I have run the 'EnvironmentCheck' app. Its output indicates a couple of possible problems but I cannot decode them:
ERROR: version.DOM.draftlevel=2.0unknown
ERROR: version.JAXP=1.0.1
Everything else looks OK in the output of EnvironmentCheck app.
I've done a fair bit of XML-based programming before but only using SAX2. I'm trying to learn XSLT stuff now but I'm stuck trying to set up my environment.
Any assistance would be appreciated.