<HTML><P>Hi,</P>
<P>just to add some information... Crimson it is.</P>
<P>Recently I installed 1.4.0 in which I have found the the following code. This shows for a fact what Jason suspected:</P><FONT size=1>
<P>public static SAXParserFactory newInstance()</P>
<P>throws FactoryConfigurationError</P>
<P>{</P>
<P>try {</P>
<P>return (SAXParserFactory) FactoryFinder.find(</P>
<P>/* The default property name according to the JAXP spec */</P>
<P>"javax.xml.parsers.SAXParserFactory",</P>
<P>/* The fallback implementation class name */</P>
<P>"org.apache.crimson.jaxp.SAXParserFactoryImpl");</P>
<P>} catch (FactoryFinder.ConfigurationError e) {</P>
<P>throw new FactoryConfigurationError(e.getException(),</P>
<P>e.getMessage());</P>
<P>}</P>
<P>}</P>
<P></FONT>cheers</P>
<P>Søren<BR>___________________________________<BR><BR>Soeren Arleth - Oracle Denmark<BR>SME Java Development<BR>EMEA Java/XML Professional Community<BR></P>
<HR>
<BLOCKQUOTE TYPE="CITE">I was hoping someone else with more information might write to help<BR>you. But since they haven't, I'll say what I can.<BR><BR>I would look into what parser JDK 1.4 is using. I suspect it's some<BR>version of Crimson as selected by JAXP since JAXP is now in the JDK. <BR>Write the list when you find out since it'll be good for us to know.<BR><BR>Then I'd look into if that Crimson version has any known problems like<BR>this, and I'd file a bug if they don't already know. We can help you<BR>with that.<BR><BR>Finally, if it is a parser bug as I suspect, then I'd change parsers to<BR>Xerces either by using the JAXP API to select Xerces, or you can use<BR>SAXBuilder itself to select Xerces. SAXBuilder by default uses JAXP to<BR>select a parser, but you can choose explicitly.<BR><BR>I suggest you investigate JDK 1.4 because this will hit other people, so<BR>hopefully we can understand the issue and not just go straight to<BR>avoidance.<BR><BR>-jh-<BR><BR>abrighto@netscape.net wrote:<BR>> <BR>> Hi all,<BR>> <BR>> The new jdk1.4 runtime library now contains the org.xml packages,<BR>> which kind of forces you to use them, it seems (I was previously<BR>> using xerces.jar).<BR>> <BR>> Since upgrading to jdk1.4, I am having problems with DTDs not being<BR>> resolved. The problem is that the EntityResolver is not being called.<BR>> The error message is then:<BR>> <BR>> "Relative URI "UIInfo.dtd"; can not be resolved without a base URI"<BR>> <BR>> Here is the related code. Any ideas on how to make this work with jdk1.4?<BR>> <BR>> /** Parse the XML document */<BR>> private static void _parseDocument(BufferedReader in) {<BR>> SAXBuilder builder = new SAXBuilder(true);<BR>> builder.setEntityResolver(new EntityResolver() {<BR>> public InputSource resolveEntity (String publicId, String systemId) {<BR>> URL url = Resources.getResource("UIInfo.dtd");<BR>> try {<BR>> return new InputSource(url.openStream());<BR>> }<BR>> catch(Exception e) {<BR>> throw new RuntimeException("Error resolving entity: " +<BR>> publicId + ": " + e.toString());<BR>> }<BR>> }<BR>> });<BR>> <BR>> try {<BR>> Document doc = builder.build(in);<BR>> Element rootElement = doc.getRootElement();<BR>> Iterator it = rootElement.getChildren().listIterator();<BR>> while(it.hasNext()) {<BR>> Element e = (Element)it.next();<BR>> _parseElement(e);<BR>> }<BR>> }<BR>> catch (JDOMException ex) {<BR>> ex.printStackTrace();<BR>> throw new RuntimeException("Error reading " + XML_FILE + ": " + ex.getMessage());<BR>> }<BR>> }<BR>> <BR>> Thanks,<BR>> Allan Brighton<BR>> <BR>> --<BR>> <BR>> __________________________________________________________________<BR>> Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/<BR>> <BR>> Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/<BR>> <BR>> _______________________________________________<BR>> To control your jdom-interest membership:<BR>> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com<BR>_______________________________________________<BR>To control your jdom-interest membership:<BR>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com<BR></BLOCKQUOTE>
<HR>
<BR></HTML>