Well, I've resolved the classpath issue.  As it turns out, my classpath
contained a directory that contains a bunch of JARs of third-party software
before my Xerces2 JAR.  I didn't realize this was a problem because I was
under the impression that Java's ClassLoader didn't search through
directories for JAR files, only for .class files (or for a particular JAR
explicitly referred to in the CLASSPATH).  When I moved Xerces2 in front of
the directory in my classpath, everything worked just fine -- well, almost
but more on that below.  Could someone clarify for me if it is, or is not
necessary to explicitly list JAR files in your classpath, or if one merely
needs to have the directory that contains the class file listed?

Now I'm back to an older problem I had with creating a null Doctype (or
removing a Doctype after its creation).  I'm getting a DOM008 Not Found
exception when I try to remove a Doctype from the Document after the
document's been created with that Doctype.  I use code similar to the
following:

        Doctype dt = new Doctype("foo", "foo", "foo");
        Document doc = dom.createDocument("", "myDoc", dt);

        doc.removeChild(dt);

This chokes and dies.  I suspect that the DOMImplementation method
createDocument does not actually use the Doctype instance that I have in the
new Document, but rather uses its information and creates a new Doctype Node
that is part of the Document.  Therefore, when I try and removed the
original Doctype from the new Document, it does not exist as a child.  Does
this sound logical to anyone else?  The implications of this is that I must
search through the first couple of nodes of the new Document to try and find
the Doctype Node.  This is rather annoying (though it probably won't take
long).  It would be nice if the DOM had a method to directly access the
Doctype node of a Document -- except that the DOM Level 2 spec says the
Doctype is non-modifyable and therefore it doesn't give you access directly.

Oh well, my rant is over.  Thank you to all who helped me figure out my
classpath problem.

Sayonara.

--------------
Brion Swanson


-----Original Message-----
From: Reynolds, Ron [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 9:08 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Help, Xerces 2.0 beta install problem


not if JAXP is used.  JAXP by-passes the classpath rule and instead takes
the first jar in the classpath that contains the
META-INF/services/JAXP-specific-files.  however older versions up to, but
not including 1.4.3 did not contain the proper files, tho Crimson does.  i'm
not sure if Xerces2 has these files or not as i'm still using the old
Xerces.

-----Original Message-----
From: Swanson, Brion [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 6:01 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Help, Xerces 2.0 beta install problem


I'm running this under SunOS 5.7 with 4 CPUs and plenty of memory and
storage (it used to be a production machine - possibly still is for old
products).

The only thing I can find in my classpath that might contains an old Xerces
version is Xalan2.  However, that appears after my Xerces2 JAR, so it should
check the Xerces2 classes before it reaches the Xerces1 classes bundled with
Xalan, correct?

--------------
Brion Swanson

-----Original Message-----
From: Andy Clark [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 2:27 AM
To: [EMAIL PROTECTED]
Subject: Re: Help, Xerces 2.0 beta install problem

What kind of environment are you running this under? Is there 
any possible way that it could be using the old Xerces JAR
file?

I don't see anything in your code that would be causing the
problem you are seeing. As long as you stick with using the
standard XML interface (DOM, SAX, JAXP, etc), you should be
shielded from any implementation changes.

-- 
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to