[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: DOCBOOK-APPS: curious about xerces parser and endorsed classe s
I'm not too familiar with the "Endorsed Standards" concept with Java. (i.e. I haven't read their documentation.) However, I'm pretty sure that the org.w3c.docm, org.xml.sax, org.xml.sax.ext, and org.xml.sax.helpers packages are almost exclusively java Interfaces, not java Classes. (You can't tell by looking in the JAR file, both compile to .class files. You'd have to look at the source code or the javadoc to be sure.) In case you're not familiar with the difference, Interfaces are used in Java to define just a list of methods that classes have to implement. They're similar to .h files in C -- all declaration, no implementation. My guess is that the xmlParserAPIs.jar just includes the Java Interfaces that define the W3C SAX and DOM standards, which, as you note, are included with Java 1.4. The xercesImpl.jar file includes the Xerces code that implements those interfaces. You should definitely put xercesImpl.jar in your endorsed/ directory. The xmlParserAPIs.jar file is probably identical to what ships with Java 1.4, but Xerces might support more or more current standards. So, that Jar file may or may not be necessary, but I *highly* doubt it will cause any problems. And, yes, adding the Jar files to the endorsed/ directory will add their contents to your CLASSPATH. Jeff -----Original Message----- From: Robert P. J. Day [mailto:rpjday@mindspring.com] Sent: Saturday, March 08, 2003 8:18 AM To: docbook apps list Subject: DOCBOOK-APPS: curious about xerces parser and endorsed classes since this involves parsing potentially docbook files, i figured i'd throw it out here. i'm trying to clarify how one properly installs the xerces-j parser for use by, for instance, saxon, and i've read conflicting explanations. the xerces-j distribution comes with three jar files: xmlParserAPIs.jar # DOM and SAX interfaces xercesImpl.jar # the implementations themselves xercesSamples.jar # some sample programs using the parser ok, it's clear that, if you want to run some of the sample programs, you should have xercesSamples.jar in the CLASSPATH somewhere. but the other two jar files have an added complication. sun's "endorsed standards override mechanism" allows you to override some of the DOM- and SAX-related classes that come with their JDK by copying the appropriate jar file(s) to the endorsed/ directory in the JDK install hierarchy. so which of the other two jar files should be copied there? the endorsed standards web page states that the current endorsed standards include: org.wc3.dom org.xml.sax org.xml.sax.ext org.xml.sax.helpers most of the docs i've seen suggest setting up xercesImpl.jar this way, since it contains some org.wc3.dom classes, right? certainly, the online xerces tutorial at ibm's developerworks suggests this. but the xmlParserAPIs.jar file contains a number of org.xml.sax classes as well. should this be installed as endorsed as well? anyone have a definitive answer on that? also, showing my ignorance of class paths in java, once a jar file is installed in endorsed/, are all of its contents now considered to be on the classpath? rday
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]