You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Ben Peter <Be...@t-online.de> on 2001/08/23 08:15:52 UTC

keeping crimson from asking for DTDs

Hi all,

I am working with crimson as packaged with the JAXP-1.1 distribution.

Even though I set it to non-validating and set it to not resolve external
references, crimson will try to access a DTD that is referenced in an XML
file and throw an exception if it cannot. This is attached below.

The scenario in which I am stuck is rather simple: I am trying to parse an
ejb-jar.xml and a weblogic-ejb-jar.xml file on my laptop while offline ;-) I
know that I could keep the DTDs locally on my machine, but that would not be
very useful, as I would have to have the DTD reference point to my local
filesystem. Also, it should be possible to tell crimson to leave the DTD
alone, or am I getting anything wrong?

Any help is very much appreciated.

Thanks in advance,
Ben


The exception an it's stacktrace:

java.net.UnknownHostException: www.bea.com
	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
	at
org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2723)
	at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1154)
	at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:488)
	at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
	at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
	at
org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:1
79)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:161)
	at
de.bpeter.ejb.utils.wl60speccollect.SpecCollector.loadFiles(SpecCollector.ja
va:22)
	at
de.bpeter.ejb.utils.wlcbgen.ClientBeanGenerator.<init>(ClientBeanGenerator.j
ava:37)
	at de.bpeter.ejb.utils.wlcbgen.Main.main(Main.java:5)


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


RE: keeping crimson from asking for DTDs

Posted by Ben Peter <Be...@t-online.de>.
Tanks a lot!

Ben

-----Original Message-----
From: Edwin Goei [mailto:edwingo@sun.com]
Sent: Friday, August 24, 2001 3:44 AM
To: general@xml.apache.org
Subject: Re: keeping crimson from asking for DTDs


Ben Peter wrote:
>
> Hi all,
>
> I am working with crimson as packaged with the JAXP-1.1 distribution.
>
> Even though I set it to non-validating and set it to not resolve external
> references, crimson will try to access a DTD that is referenced in an XML
> file and throw an exception if it cannot. This is attached below.
>
> The scenario in which I am stuck is rather simple: I am trying to parse an
> ejb-jar.xml and a weblogic-ejb-jar.xml file on my laptop while offline ;-)
I
> know that I could keep the DTDs locally on my machine, but that would not
be
> very useful, as I would have to have the DTD reference point to my local
> filesystem. Also, it should be possible to tell crimson to leave the DTD
> alone, or am I getting anything wrong?

I just added this to my JAXP FAQ, see the following link which might
help...
http://xml.apache.org/~edwingo/jaxp-faq.html#EntityResolver

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: keeping crimson from asking for DTDs

Posted by Edwin Goei <ed...@sun.com>.
Ben Peter wrote:
> 
> Hi all,
> 
> I am working with crimson as packaged with the JAXP-1.1 distribution.
> 
> Even though I set it to non-validating and set it to not resolve external
> references, crimson will try to access a DTD that is referenced in an XML
> file and throw an exception if it cannot. This is attached below.
> 
> The scenario in which I am stuck is rather simple: I am trying to parse an
> ejb-jar.xml and a weblogic-ejb-jar.xml file on my laptop while offline ;-) I
> know that I could keep the DTDs locally on my machine, but that would not be
> very useful, as I would have to have the DTD reference point to my local
> filesystem. Also, it should be possible to tell crimson to leave the DTD
> alone, or am I getting anything wrong?

I just added this to my JAXP FAQ, see the following link which might
help...
http://xml.apache.org/~edwingo/jaxp-faq.html#EntityResolver

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org